test(carriers): an interpolated from identifier is not an import

This commit is contained in:
montjeffrey
2026-10-08 16:48:47 +00:00
parent 0d3c85bd54
commit e85c529eaf
@@ -152,6 +152,11 @@ for (const [label, source, expected] of SCANNER_CASES) {
});
}
test('scanner: an identifier named from before a template chunk is not an import', () => {
assert.deepEqual(validator().extractReferences('const s = `${from} is shipped as ${to}`;'),
{ specifiers: [], packages: [], dynamic: [] });
});
test('unknown flags are rejected', () => {
const result = childProcess.spawnSync(process.execPath, [SCRIPT_PATH, '--write'], {
cwd: REPO_ROOT, encoding: 'utf8', timeout: 120_000,