From 06325df6f3e45a2f0d8aa1c7c8f3402e3b0550f3 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Thu, 25 Jan 2024 14:04:57 +0800 Subject: [PATCH] add failed test --- test/test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test.js b/test/test.js index a160ed2..11b6b8f 100644 --- a/test/test.js +++ b/test/test.js @@ -192,6 +192,22 @@ export const tests = [ assert_equal(frame.children[1].result.value, 1) }), + + // foo() call fails when tries to get closed variables, because + // NOT_INITIALIZED is not initialized at the moment `foo` is called + // TODO fix later + + // test('closure bug', () => { + // test_initial_state(` + // foo() + // const NOT_INITIALIZED = 1 + // function foo(){ + // return NOT_INITIALIZED + // } + // `) + // }), + + test('member access', () => { assert_code_evals_to( 'const foo = {bar: {baz: 2}};foo.bar.baz;',