From 31a9eafd54c653547540f1cc9493b2563dd0aeb3 Mon Sep 17 00:00:00 2001 From: Clement Denis Date: Mon, 1 Mar 2021 12:37:10 +0000 Subject: [PATCH] fix: missing return in hello-there test and relative path --- js/tests/hello-there_test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/tests/hello-there_test.js b/js/tests/hello-there_test.js index c1667f801..fce22c8e4 100644 --- a/js/tests/hello-there_test.js +++ b/js/tests/hello-there_test.js @@ -2,8 +2,8 @@ import { readFileSync as read } from 'fs' // /*/ // ⚡ export const tests = [ - ({ eq }) => // code must use console.log - read('/jail/student/hello-there.js', 'utf8').trim().includes('console.log'), + ({ eq, path }) => // code must use console.log + read(path, 'utf8').trim().includes('console.log'), async ({ eq, code }) => { // console.log must have been called with the right value @@ -18,6 +18,6 @@ export const tests = [ const url = `data:text/javascript;base64,${b64}` await import(url) console.log = log - eq(args.join(' ').trim(), 'Hello There') + return eq(args.join(' ').trim(), 'Hello There') }, ]