Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions lib/node_modules/@stdlib/utils/parallel/test/test.node.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ var proxyquire = require( 'proxyquire' );

// TESTS //

tape( 'the file runs a worker script', function test( t ) {
tape( 'main export is an entry-point script that runs a worker process', function test( t ) {
var called = false;

t.ok( true, __filename );

proxyquire( './../lib/node/worker/index.js', {
'./worker.js': done
'./worker.js': function onCall() {
called = true;
}
});
function done() {
t.ok( true, __filename );
t.ok( true, 'runs worker script' );
t.end();
}

t.strictEqual( called, true, 'requiring the file invokes the worker' );
t.end();
});