mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
fix let without assignment
This commit is contained in:
10
test/test.js
10
test/test.js
@@ -329,6 +329,16 @@ export const tests = [
|
||||
assert_equal(i.value_explorer.result.value, {y: 2, z: 3, q: 4})
|
||||
}),
|
||||
|
||||
test('let variable not initialized bug', () => {
|
||||
const code = `
|
||||
let x
|
||||
x /*label*/
|
||||
`
|
||||
const i = test_initial_state(code, code.indexOf('x /*label'))
|
||||
assert_equal(i.value_explorer.result.ok, true)
|
||||
assert_equal(i.value_explorer.result.value === undefined, true)
|
||||
}),
|
||||
|
||||
test('else if', () => {
|
||||
const code = `
|
||||
let x
|
||||
|
||||
Reference in New Issue
Block a user