aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-04-02 13:44:50 +1000
committerdaurnimator <quae@daurnimator.com>2018-04-02 13:45:58 +1000
commit39ca3a54682f023afae87e2e307fd18fdde20b57 (patch)
treea2523c753749737b3c21ad80166baf81f86431e4
parent6cc7171dd51d0783c3ab4b0b8fa354af51aa2d20 (diff)
downloadfengari-39ca3a54682f023afae87e2e307fd18fdde20b57.tar.gz
fengari-39ca3a54682f023afae87e2e307fd18fdde20b57.tar.bz2
fengari-39ca3a54682f023afae87e2e307fd18fdde20b57.zip
tests/load.js: assert loadfile result for correct error messages
-rw-r--r--tests/load.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/load.js b/tests/load.js
index 8555014..0eb0ccf 100644
--- a/tests/load.js
+++ b/tests/load.js
@@ -110,7 +110,7 @@ test('luaL_loadbuffer', function (t) {
// TODO: test stdin
test('loadfile', function (t) {
let luaCode = `
- local f = loadfile("tests/loadfile-test.lua")
+ local f = assert(loadfile("tests/loadfile-test.lua"))
return f()
`, L;
@@ -142,7 +142,7 @@ test('loadfile', function (t) {
test('loadfile (binary)', function (t) {
let luaCode = `
- local f = loadfile("tests/loadfile-test.bc")
+ local f = assert(loadfile("tests/loadfile-test.bc"))
return f()
`, L;