mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
bare imports
This commit is contained in:
18
test/test.js
18
test/test.js
@@ -786,6 +786,24 @@ export const tests = [
|
||||
assert_equal(mods.root.is_eq, true)
|
||||
}),
|
||||
|
||||
test('modules empty import', () => {
|
||||
const i = test_initial_state({
|
||||
'': 'import {} from "a"',
|
||||
'a': 'Object.assign(globalThis, {test_import: true})',
|
||||
})
|
||||
assert_equal(i.active_calltree_node.ok, true)
|
||||
assert_equal(globalThis.test_import, true)
|
||||
}),
|
||||
|
||||
test('modules bare import', () => {
|
||||
const i = test_initial_state({
|
||||
'': 'import "a"',
|
||||
'a': 'Object.assign(globalThis, {test_import: true})',
|
||||
})
|
||||
assert_equal(i.active_calltree_node.ok, true)
|
||||
assert_equal(globalThis.test_import, true)
|
||||
}),
|
||||
|
||||
test('bug parser pragma external', () => {
|
||||
const result = parse(`
|
||||
// external
|
||||
|
||||
Reference in New Issue
Block a user