From bf46ff3c9dea30e8fcf84d88ed756f2db62f123b Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 10 Jan 2014 20:46:31 +0100 Subject: [PATCH] fix tests --- Gruntfile.js | 2 +- README.md | 3 ++- test/crypto/cipher/aes.js | 2 +- test/crypto/cipher/blowfish.js | 2 +- test/crypto/cipher/cast5.js | 2 +- test/crypto/cipher/des.js | 2 +- test/crypto/cipher/twofish.js | 2 +- test/crypto/crypto.js | 2 +- test/crypto/hash/md5.js | 2 +- test/crypto/hash/ripemd.js | 2 +- test/crypto/hash/sha.js | 2 +- test/general/basic.js | 2 +- test/general/key.js | 2 +- test/general/keyring.js | 2 +- test/general/packet.js | 2 +- test/general/signature.js | 2 +- 16 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 7df5a5e8..73541387 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -153,5 +153,5 @@ module.exports = function(grunt) { }); // Test/Dev tasks - grunt.registerTask('test', ['copy', 'mocha_phantomjs', 'mochaTest']); + grunt.registerTask('test', ['copy', 'mochaTest', 'mocha_phantomjs']); }; diff --git a/README.md b/README.md index 06eeb3aa..7e2ae438 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ You can download a prebuilt minified version of the library under [releases](htt Then take `dist/openpgp.min.js` to use in your project. #Usage -It's best the check the documentation for detailed API information. There are also alot of useful examples under 'test/'. +It's best the check the documentation for detailed API information. There are also alot of useful examples under 'test/'. You can run the tests by calling: + npm install && npm test ## Documentation A jsdoc build of our code comments is available at [doc/index.html](doc/index.html). Public calls should generally be made through the OpenPGP object [doc/openpgp.html](doc/openpgp.html). diff --git a/test/crypto/cipher/aes.js b/test/crypto/cipher/aes.js index ce1ccade..2befa313 100644 --- a/test/crypto/cipher/aes.js +++ b/test/crypto/cipher/aes.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/blowfish.js b/test/crypto/cipher/blowfish.js index 81100dd7..2600a06b 100644 --- a/test/crypto/cipher/blowfish.js +++ b/test/crypto/cipher/blowfish.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, BFencrypt = openpgp.crypto.cipher.blowfish, diff --git a/test/crypto/cipher/cast5.js b/test/crypto/cipher/cast5.js index 40ab972e..6a222fde 100644 --- a/test/crypto/cipher/cast5.js +++ b/test/crypto/cipher/cast5.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/des.js b/test/crypto/cipher/des.js index 958b2a78..1b2c49ef 100644 --- a/test/crypto/cipher/des.js +++ b/test/crypto/cipher/des.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/cipher/twofish.js b/test/crypto/cipher/twofish.js index e2ee828c..0ad46dde 100644 --- a/test/crypto/cipher/twofish.js +++ b/test/crypto/cipher/twofish.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, chai = require('chai'), diff --git a/test/crypto/crypto.js b/test/crypto/crypto.js index acd43981..bda39828 100644 --- a/test/crypto/crypto.js +++ b/test/crypto/crypto.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/crypto/hash/md5.js b/test/crypto/hash/md5.js index b3d0a777..fb431b0a 100644 --- a/test/crypto/hash/md5.js +++ b/test/crypto/hash/md5.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, MD5 = openpgp.crypto.hash.md5, diff --git a/test/crypto/hash/ripemd.js b/test/crypto/hash/ripemd.js index 75c353c9..df153e04 100644 --- a/test/crypto/hash/ripemd.js +++ b/test/crypto/hash/ripemd.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, RMDstring = openpgp.crypto.hash.ripemd, diff --git a/test/crypto/hash/sha.js b/test/crypto/hash/sha.js index ce8da58a..cd4166d0 100644 --- a/test/crypto/hash/sha.js +++ b/test/crypto/hash/sha.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../../src/index'); var util = openpgp.util, hash = openpgp.crypto.hash, diff --git a/test/general/basic.js b/test/general/basic.js index f712ec2e..a4d81eae 100644 --- a/test/general/basic.js +++ b/test/general/basic.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/key.js b/test/general/key.js index ccaa40ca..75657025 100644 --- a/test/general/key.js +++ b/test/general/key.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/keyring.js b/test/general/keyring.js index d4003d5b..0d7829cf 100644 --- a/test/general/keyring.js +++ b/test/general/keyring.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var keyring = new openpgp.Keyring(), chai = require('chai'), diff --git a/test/general/packet.js b/test/general/packet.js index ecac10ff..a2f4d74e 100644 --- a/test/general/packet.js +++ b/test/general/packet.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect; diff --git a/test/general/signature.js b/test/general/signature.js index f276d64f..c2e2953b 100644 --- a/test/general/signature.js +++ b/test/general/signature.js @@ -1,6 +1,6 @@ 'use strict'; -var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('openpgp'); +var openpgp = typeof window != 'undefined' && window.openpgp ? window.openpgp : require('../../src/index'); var chai = require('chai'), expect = chai.expect;