Skip to content

Commit

Permalink
and another test
Browse files Browse the repository at this point in the history
  • Loading branch information
perbergland committed Oct 22, 2024
1 parent 7ce4fae commit accc66c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/babel-plugin-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,24 @@ export const isServer = Meteor.isServer;
/async: false\n/
);
});

it('detects TLA for simple content', () => {
const code = `
import { Meteor } from "meteor/meteor";
export const isServer = await Meteor.isServer;
`;
const ast = parse(code);
delete ast.tokens;
const result = transformFromAst(ast, code, {
plugins: [[reifyPlugin, {
dynamicImport: true
}]]
});
assert.match(
result.code,
/async: true\n/
);
});
});

function check(code, options) {
Expand Down

0 comments on commit accc66c

Please sign in to comment.