From d7ef8e0cf7ebfda0f6343a6cccd8fd9032f811f8 Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Sat, 13 Apr 2024 13:23:28 +0200 Subject: [PATCH] fix tests --- __tests__/tests.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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',