File tree Expand file tree Collapse file tree 8 files changed +53
-24
lines changed Expand file tree Collapse file tree 8 files changed +53
-24
lines changed Original file line number Diff line number Diff line change 297
297
"build:tsc" : " tsc --project tsconfig.prod.json && tsc --project tsconfig.prod.esm.json" ,
298
298
"test" : " npm-run-all test:node" ,
299
299
"test:node" : " cd test && npm install && cd .. && mocha" ,
300
- "clean" : " rimraf test-builds bip39 '*.js' '*.js.map' '*.d.ts' '*.d.ts.map' 'src/**/*.js'" ,
300
+ "clean" : " rimraf test/test -builds bip39 '*.js' '*.js.map' '*.d.ts' '*.d.ts.map' 'src/**/*.js'" ,
301
301
"lint" : " eslint" ,
302
302
"lint:fix" : " eslint --fix" ,
303
303
"browser-tests" : " npm-run-all browser-tests:build browser-tests:test" ,
361
361
"context" : " browser"
362
362
}
363
363
}
364
- }
364
+ }
Original file line number Diff line number Diff line change 1
1
set -e
2
2
3
+ cd ./test/
4
+ echo " Install package to tests"
5
+ # Cleanup old module build
6
+ rm -rf ./node_modules
7
+ npm install
8
+
3
9
echo " Building tests with TypeScript"
4
- npx tsc --project tsconfig.json
10
+ npx tsc --project ./ tsconfig.json
5
11
6
12
echo " Building tests with Parcel"
7
- npx parcel build --no-cache --no-optimize test-builds/tsc/test/test-vectors/* .js --dist-dir test-builds/parcel --target parcel_tests
13
+ npx parcel build --no-cache --no-optimize ./ test-builds/tsc/test/test-vectors/* .js --dist-dir ./ test-builds/parcel --target parcel_tests
8
14
9
15
echo " Building tests with Browserify"
10
- npx browserify test-builds/tsc/test/test-vectors/* .js > test-builds/browserify-build.js
16
+ npx browserify ./ test-builds/tsc/test/test-vectors/* .js > ./ test-builds/browserify-build.js
11
17
12
18
echo " Building tests with webpack"
13
19
npx webpack --mode development ./test-builds/tsc/test/test-vectors/* .js --output-path ./test-builds
14
20
15
21
echo " Building tests with Rollup"
16
- rollup -c test /rollup.config.js
22
+ rollup -c . /rollup.config.js
Original file line number Diff line number Diff line change 1
- module . exports = function ( config ) {
1
+ module . exports = function ( config ) {
2
2
config . set ( {
3
3
frameworks : [ "mocha" ] ,
4
- files : [ ".. /test-builds/browserify-build.js" ] ,
4
+ files : [ "./test-builds/browserify-build.js" ] ,
5
5
colors : true ,
6
6
logLevel : config . LOG_INFO ,
7
7
browsers : [ "ChromeHeadless" ] ,
@@ -12,7 +12,7 @@ module.exports = function(config) {
12
12
concurrency : Infinity ,
13
13
reporters : [ "mocha" ] ,
14
14
client : {
15
- captureConsole : true
16
- }
15
+ captureConsole : true ,
16
+ } ,
17
17
} ) ;
18
18
} ;
Original file line number Diff line number Diff line change 1
- module . exports = function ( config ) {
1
+ module . exports = function ( config ) {
2
2
config . set ( {
3
3
frameworks : [ "mocha" ] ,
4
- files : [ ".. /test-builds/parcel/*.js" ] ,
4
+ files : [ "./test-builds/parcel/*.js" ] ,
5
5
colors : true ,
6
6
logLevel : config . LOG_INFO ,
7
7
browsers : [ "ChromeHeadless" ] ,
@@ -12,7 +12,7 @@ module.exports = function(config) {
12
12
concurrency : Infinity ,
13
13
reporters : [ "mocha" ] ,
14
14
client : {
15
- captureConsole : true
16
- }
15
+ captureConsole : true ,
16
+ } ,
17
17
} ) ;
18
18
} ;
Original file line number Diff line number Diff line change 1
- module . exports = function ( config ) {
1
+ module . exports = function ( config ) {
2
2
config . set ( {
3
3
frameworks : [ "mocha" ] ,
4
- files : [ ".. /test-builds/rollup/*.js" ] ,
4
+ files : [ "./test-builds/rollup/*.js" ] ,
5
5
colors : true ,
6
6
logLevel : config . LOG_INFO ,
7
7
browsers : [ "ChromeHeadless" ] ,
@@ -12,7 +12,7 @@ module.exports = function(config) {
12
12
concurrency : Infinity ,
13
13
reporters : [ "mocha" ] ,
14
14
client : {
15
- captureConsole : true
16
- }
15
+ captureConsole : true ,
16
+ } ,
17
17
} ) ;
18
18
} ;
Original file line number Diff line number Diff line change 1
- module . exports = function ( config ) {
1
+ module . exports = function ( config ) {
2
2
config . set ( {
3
3
frameworks : [ "mocha" ] ,
4
- files : [ ".. /test-builds/main.js" ] ,
4
+ files : [ "./test-builds/main.js" ] ,
5
5
colors : true ,
6
6
logLevel : config . LOG_INFO ,
7
7
browsers : [ "ChromeHeadless" ] ,
@@ -12,7 +12,7 @@ module.exports = function(config) {
12
12
concurrency : Infinity ,
13
13
reporters : [ "mocha" ] ,
14
14
client : {
15
- captureConsole : true
16
- }
15
+ captureConsole : true ,
16
+ } ,
17
17
} ) ;
18
18
} ;
Original file line number Diff line number Diff line change 10
10
"author" : " " ,
11
11
"license" : " ISC" ,
12
12
"dependencies" : {
13
- "ethereum-cryptography" : " file:.."
13
+ "ethereum-cryptography" : " file:.." ,
14
+ "@types/mocha" : " 9.1.1"
15
+ },
16
+ "targets" : {
17
+ "parcel_tests" : {
18
+ "context" : " browser"
19
+ }
14
20
}
15
- }
21
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "target" : " es2020" ,
4
+ "module" : " commonjs" ,
5
+ "strict" : true ,
6
+ "downlevelIteration" : true ,
7
+ "rootDirs" : [
8
+ " ./"
9
+ ],
10
+ "outDir" : " ./test-builds/tsc" ,
11
+ "noUnusedLocals" : true ,
12
+ "declaration" : true
13
+ },
14
+ "include" : [
15
+ " ./**/*.ts" ,
16
+ ]
17
+ }
You can’t perform that action at this time.
0 commit comments