mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-05 00:28:47 +00:00
multiple web workers
This commit is contained in:
@@ -363,7 +363,7 @@ describe('OpenPGP.js public api tests', function() {
|
||||
postMessage: function() {}
|
||||
};
|
||||
openpgp.initWorker({
|
||||
worker: workerStub
|
||||
workers: [workerStub]
|
||||
});
|
||||
expect(openpgp.getWorker()).to.exist;
|
||||
openpgp.destroyWorker();
|
||||
@@ -522,7 +522,7 @@ describe('OpenPGP.js public api tests', function() {
|
||||
postMessage: function() {}
|
||||
};
|
||||
openpgp.initWorker({
|
||||
worker: workerStub
|
||||
workers: [workerStub]
|
||||
});
|
||||
const proxyGenStub = stub(openpgp.getWorker(), 'delegate');
|
||||
getWebCryptoAllStub.returns();
|
||||
|
||||
@@ -50,7 +50,7 @@ function tests() {
|
||||
describe('Random number pipeline', function() {
|
||||
it('Random number buffer automatically reseeded', function() {
|
||||
const worker = new Worker('../dist/openpgp.worker.js');
|
||||
const wProxy = new openpgp.AsyncProxy({ path:'../dist/openpgp.worker.js', worker });
|
||||
const wProxy = new openpgp.AsyncProxy({ path:'../dist/openpgp.worker.js', workers: [worker] });
|
||||
|
||||
return wProxy.delegate('encrypt', { publicKeys:[pubKey], data:plaintext });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user