Skip to content

Commit

Permalink
Fix flow and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Giancarlo Anemone authored and generic-probot-app-workflow[bot] committed Dec 17, 2019
1 parent 469a085 commit d7e3230
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/__tests__/typedefs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,10 @@ test('typedef reserved type', () => {
const root = tmp.dirSync().name;
const p = path.resolve(root, 'types.thrift');
fs.writeFileSync(p, `typedef string Symbol`);
let output = new ThriftFileConverter(p, true).generateFlowFile();
let output = new ThriftFileConverter(p, false).generateFlowFile();
expect(output).toMatchInlineSnapshot(`
"// @flow
// Source: /var/folders/sz/v9gcp6kx09g3b49qqnll68lc0000gp/T/tmp-35121caTR4AtzFmXM/types.thrift
export type _Symbol = string;
"
`);
Expand Down
1 change: 1 addition & 0 deletions src/main/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export class ThriftFileConverter {
)};`;
}
if (def.value.type === 'Identifier') {
// $FlowFixMe
return `export const ${id(def.id.name)} = ${id(def.value.name)}`;
}
}
Expand Down

0 comments on commit d7e3230

Please sign in to comment.