diff --git a/lib/wrap-loader.cjs b/lib/wrap-loader.cjs index e993efa..e2f297c 100644 --- a/lib/wrap-loader.cjs +++ b/lib/wrap-loader.cjs @@ -19,7 +19,7 @@ wrapLoader.pitch = function pitch (remainingRequest) { // wrap the test in a function that is only called when we want it called return ` - import { registry } from ${JSON.stringify(`.${path.sep}${path.relative(process.cwd(), path.resolve(argv.outputDir, 'test-registry.js'))}`)} + import { registry } from ${JSON.stringify(`./${path.relative(process.cwd(), path.resolve(argv.outputDir, 'test-registry.js'))}`)} registry.argv = JSON.parse(${JSON.stringify(JSON.stringify(argv))}) registry.tests.push({ name: JSON.parse('${JSON.stringify(path.normalize(path.relative(process.cwd(), remainingRequest))).replace(/\\/g, '/')}'), diff --git a/test/test-bare-sync.js b/test/test-bare-sync.js index 5b525dc..54c5c67 100644 --- a/test/test-bare-sync.js +++ b/test/test-bare-sync.js @@ -147,6 +147,9 @@ testing bare fixture stdout = stdout.replace(/^ +at .*\n/gm, '') // stack traces const expected = expectedTemplate.replace(/WORKER/, 'not in worker') let found = stdout.indexOf(expected) + if (found === -1) { + console.error(stdout) + } assert.ok(found > -1, 'stdout contains expected test output') found = stdout.indexOf(expected, found + 1) assert.ok(found === -1, 'stdout doesn\'t contain second instance of expected test output')