Use absolute path for worker shim in dispatch test

Node 11 causes TinyWorker to resolve its start script path differently,
compared to Node 8. Using an absolute path works for both.
This commit is contained in:
Christopher Willis-Ford 2018-11-19 11:57:43 -08:00
parent 2ca735eab4
commit 30a1ba52e3

View file

@ -49,7 +49,8 @@ test('local', t => {
test('remote', t => { test('remote', t => {
const fixturesDir = path.resolve(__dirname, '../fixtures'); const fixturesDir = path.resolve(__dirname, '../fixtures');
const worker = new Worker('./test/fixtures/dispatch-test-worker-shim.js', null, {cwd: fixturesDir}); const shimPath = path.resolve(fixturesDir, 'dispatch-test-worker-shim.js');
const worker = new Worker(shimPath, null, {cwd: fixturesDir});
dispatch.addWorker(worker); dispatch.addWorker(worker);
const waitForWorker = new Promise(resolve => { const waitForWorker = new Promise(resolve => {