diff --git a/test/general/key.js b/test/general/key.js index 703b1a64..e9d8a803 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -1,3 +1,5 @@ +/* globals tryTests: true */ + const openpgp = typeof window !== 'undefined' && window.openpgp ? window.openpgp : require('../../dist/openpgp'); const stub = require('sinon/lib/sinon/stub'); @@ -1652,21 +1654,20 @@ describe('Key', function() { describe('V4', versionSpecificTests); - describe('V5', function() { - let aead_protectVal; - let aead_protect_versionVal; - beforeEach(function() { + let aead_protectVal; + let aead_protect_versionVal; + tryTests('V5', versionSpecificTests, { + if: !openpgp.config.saucelabs, + beforeEach: function() { aead_protectVal = openpgp.config.aead_protect; aead_protect_versionVal = openpgp.config.aead_protect_version; openpgp.config.aead_protect = true; openpgp.config.aead_protect_version = 4; - }); - afterEach(function() { + }, + afterEach: function() { openpgp.config.aead_protect = aead_protectVal; openpgp.config.aead_protect_version = aead_protect_versionVal; - }); - - versionSpecificTests(); + } }); it('Parsing armored text with RSA key and ECC subkey', async function() { diff --git a/test/general/openpgp.js b/test/general/openpgp.js index 3560ad02..bbbdee72 100644 --- a/test/general/openpgp.js +++ b/test/general/openpgp.js @@ -767,7 +767,7 @@ describe('OpenPGP.js public api tests', function() { }); tryTests('GCM mode', tests, { - if: true, + if: !openpgp.config.saucelabs, beforeEach: function() { openpgp.config.aead_protect = true; openpgp.config.aead_protect_version = 0; @@ -801,7 +801,7 @@ describe('OpenPGP.js public api tests', function() { }); tryTests('OCB mode', tests, { - if: true, + if: !openpgp.config.saucelabs, beforeEach: function() { openpgp.config.aead_protect = true; openpgp.config.aead_mode = openpgp.enums.aead.ocb;