From 66ed326c7d3d57b42a2b728d49d3f076ef20e2e9 Mon Sep 17 00:00:00 2001 From: Nick Peihl Date: Tue, 7 Nov 2017 10:50:44 -0800 Subject: [PATCH] Move web worker test to new tests directory --- test.js | 4 ++-- test-worker.js => tests/webworker.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename test-worker.js => tests/webworker.js (87%) diff --git a/test.js b/test.js index 907afa2..ab2d02d 100644 --- a/test.js +++ b/test.js @@ -5,10 +5,10 @@ if (typeof window !== 'undefined') { var arrConst = new Uint8Array(16) test('randombytes works in web worker context', function (t) { var work = require('webworkify') - var w = work(require('./test-worker.js')) + var w = work(require('./tests/webworker.js')) w.addEventListener('message', function (e) { var arr = e.data[0] - t.notEqual(arrConst, arr, '') + t.notEqual(arrConst, arr, 'Array should contain random bytes') t.end() window.close() }) diff --git a/test-worker.js b/tests/webworker.js similarity index 87% rename from test-worker.js rename to tests/webworker.js index c60e117..72aa59a 100644 --- a/test-worker.js +++ b/tests/webworker.js @@ -1,4 +1,4 @@ -var sodium = require('.') +var sodium = require('../') module.exports = function (self) { self.addEventListener('message', function (e) {