NAME=js tests
FILE=-
CMDS=<<EOF
js var a = 123
js r2.log(a)
js!
js r2.log(a)
EOF
EXPECT=<<EOF
123
EOF
EXPECT_ERR=<<EOF
ERROR: ReferenceError: 'a' is not defined
ERROR:     at <eval> (-)

ERROR: null
EOF
RUN

NAME=qjs async test
FILE=-
CMDS=<<EOF
""js import("r2pipe").then((r2pipe)=> {console.log(r2pipe.open());}).catch(console.error);
EOF
EXPECT=<<EOF
[object Object]
EOF
EXPECT_ERR=
RUN

