diff --git a/__tests__/tests.ts b/__tests__/tests.ts index d9cfc79..6dbdf6c 100644 --- a/__tests__/tests.ts +++ b/__tests__/tests.ts @@ -996,7 +996,7 @@ describe('htmlbars-inline-precompile', function () { expect(transformed).toContain(`window.define('my-app/components/thing', thing)`); }); - it('can emit side-effectful import', function () { + it('update scope correctly', function () { let compatTransform: ExtendedPluginBuilder = () => { return { name: 'compat-transform', @@ -1039,7 +1039,7 @@ describe('htmlbars-inline-precompile', function () { visitor: { ElementNode(node) { if (node.tag === 'Thing') { - node.tag = 'NewThing'; + node.tag = env.meta.jsutils.bindExpression('Thing', path, { nameHint: 'NewThing' }); } }, }, @@ -1086,7 +1086,7 @@ describe('htmlbars-inline-precompile', function () { }`); }); - it('updates scope correctly when renamed', function () { + it('can emit side-effectful import', function () { let compatTransform: ExtendedPluginBuilder = (env) => { return { name: 'compat-transform',