Api tests work under node.js

This commit is contained in:
Tankred Hase 2016-02-09 19:14:43 +07:00
parent 7d97bcec58
commit 9d37a83a79

View File

@ -365,7 +365,11 @@ describe('OpenPGP.js public api tests', function() {
openpgp.initWorker({ path:'../dist/openpgp.worker.js' });
});
tests();
if (openpgp.getWorker()) {
tests();
} else {
it.skip('No Web Worker support --> skipping tests.');
}
after(function() {
openpgp.destroyWorker(); // cleanup worker in case of failure