File tree Expand file tree Collapse file tree 8 files changed +1379
-1412
lines changed
Expand file tree Collapse file tree 8 files changed +1379
-1412
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ sudo: false
22
33language : node_js
44
5- node_js : " 8.10 "
5+ node_js : " 12 "
66
77script : npm run test
Original file line number Diff line number Diff line change 1414 "build-dist" : " webpack --progress" ,
1515 "dist" : " npm run build-dist" ,
1616 "prepare" : " npm run build-dist" ,
17- "test" : " mocha test" ,
17+ "test" : " mocha --recursive test" ,
1818 "jsdoc" : " jsdoc -c jsdoc.json -r"
1919 },
2020 "repository" : {
4646 "dependencies" : {
4747 "@sinonjs/text-encoding" : " ^0.7.1" ,
4848 "base64url" : " ^3.0.1" ,
49- "isomorphic-webcrypto" : " ^2.3.2 "
49+ "isomorphic-webcrypto" : " ^2.3.6 "
5050 },
5151 "devDependencies" : {
5252 "babel-cli" : " ^6.26.0" ,
5353 "babel-preset-env" : " ^1.7.0" ,
5454 "chai" : " ^4.2.0" ,
5555 "chai-as-promised" : " ^7.1.1" ,
5656 "dirty-chai" : " ^2.0.1" ,
57- "mocha" : " ^6.2.2 " ,
58- "webpack" : " ^4.41.2 " ,
59- "webpack-cli" : " ^3.3.10 "
57+ "mocha" : " ^8.0.1 " ,
58+ "webpack" : " ^4.44.0 " ,
59+ "webpack-cli" : " ^3.3.12 "
6060 }
6161}
Original file line number Diff line number Diff line change 55 * @ignore
66 */
77const base64url = require ( 'base64url' )
8- const crypto = require ( 'isomorphic-webcrypto ' )
8+ let crypto = require ( '../crypto ' )
99const TextEncoder = require ( '../text-encoder' )
1010
1111/**
Original file line number Diff line number Diff line change 1+ const imported = require ( 'isomorphic-webcrypto' )
2+
3+ module . exports = ( imported . default ? imported . default : imported )
Original file line number Diff line number Diff line change 11/**
22 * @module JSON Object Signing and Encryption (JOSE)
33 */
4+ const crypto = require ( './crypto' )
45const JWA = require ( './jose/JWA' )
56const JWK = require ( './jose/JWK' )
67const JWKSet = require ( './jose/JWKSet' )
@@ -11,6 +12,7 @@ const JWS = require('./jose/JWS')
1112 * Export
1213 */
1314module . exports = {
15+ crypto,
1416 JWA ,
1517 JWK ,
1618 JWKSet,
Original file line number Diff line number Diff line change 1+ 'use strict'
2+
3+ /**
4+ * Test dependencies
5+ */
6+ const chai = require ( 'chai' )
7+ const chaiAsPromised = require ( 'chai-as-promised' )
8+
9+ /**
10+ * Assertions
11+ */
12+ chai . should ( )
13+ chai . use ( chaiAsPromised )
14+ let expect = chai . expect
15+
16+ /**
17+ * Code under test
18+ */
19+ const Index = require ( '../src/' )
20+
21+ /**
22+ * Tests
23+ */
24+ describe ( 'Index' , ( ) => {
25+ it ( 'exports crypto' , ( ) => {
26+ return Object . keys ( Index . crypto ) . should . deep . equal ( [ 'subtle' ] )
27+ } )
28+ } )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments