This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 5 files changed +140
-2
lines changed
5 files changed +140
-2
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
+ const path = require ( 'path' )
3
4
const IPFSFactory = require ( 'ipfsd-ctl' )
4
5
const parallel = require ( 'async/parallel' )
5
6
const MockPreloadNode = require ( './test/utils/mock-preload-node' )
@@ -21,6 +22,39 @@ module.exports = {
21
22
included : false
22
23
} ] ,
23
24
browserNoActivityTimeout : 100 * 1000 ,
25
+ reporters : [ 'mocha-own' , 'coverage-istanbul' ] ,
26
+ coverageIstanbulReporter : {
27
+ reports : [ 'json' ] ,
28
+ dir : path . join ( __dirname , 'coverage' ) ,
29
+ combineBrowserReports : true ,
30
+ fixWebpackSourcePaths : true ,
31
+ } ,
32
+ preprocessors : { 'node_modules/aegir/src/config/karma-entry.js' : [ 'webpack' , 'sourcemap' ] } ,
33
+ webpack : {
34
+ module : {
35
+ rules : [
36
+ // instrument only testing sources with Istanbul
37
+ {
38
+ test : / \. j s $ / ,
39
+ use : { loader : 'istanbul-instrumenter-loader' } ,
40
+ include : path . resolve ( 'src/' )
41
+ }
42
+ ]
43
+ }
44
+ } ,
45
+ customLaunchers : {
46
+ ChromeDocker : {
47
+ base : 'ChromeHeadless' ,
48
+ // We must disable the Chrome sandbox when running Chrome inside Docker (Chrome's sandbox needs
49
+ // more permissions than Docker allows by default)
50
+ flags : [ '--no-sandbox' ]
51
+ }
52
+ } ,
53
+ client : {
54
+ mocha : {
55
+ bail : true ,
56
+ }
57
+ } ,
24
58
singleRun : true
25
59
} ,
26
60
hooks : {
Original file line number Diff line number Diff line change
1
+ * text =auto
2
+ test /** text eol =lf
3
+ src /init-files /** text eol =lf
Original file line number Diff line number Diff line change
1
+ image : hugomrdias/node-alpine:test
2
+ stages :
3
+ - check
4
+ - test
5
+ - cov
6
+ - pre-release
7
+ - release
8
+
9
+ variables :
10
+ DOCKER_DRIVER : overlay2
11
+
12
+ before_script :
13
+ - yarn
14
+
15
+ check :
16
+ stage : check
17
+ script :
18
+ - yarn lint
19
+ - yarn dep-check
20
+ # - npm install --no-lockfile @commitlint/config-conventional @commitlint/cli --save-dev
21
+ # - npx commitlint --extends=@commitlint/config-conventional --from=$CI_COMMIT_BEFORE_SHA --to=$CI_COMMIT_SHA
22
+ - yarn build
23
+ artifacts :
24
+ paths :
25
+ - dist/
26
+
27
+ linux-node-10 :
28
+ image : node:10
29
+ stage : test
30
+ script :
31
+ - npx nyc -s npm run test:node -- --bail
32
+ artifacts :
33
+ paths :
34
+ - .nyc_output/
35
+
36
+ linux-node-11 :
37
+ allow_failure : true
38
+ image : node:11
39
+ stage : test
40
+ script :
41
+ - npx nyc -s npm run test:node -- --bail
42
+ artifacts :
43
+ paths :
44
+ - .nyc_output/
45
+
46
+ macos-node-10 :
47
+ stage : test
48
+ script :
49
+ - npx nyc -s npm run test:node -- --bail
50
+ tags :
51
+ - mac
52
+ artifacts :
53
+ paths :
54
+ - .nyc_output/
55
+
56
+ win-node-10 :
57
+ stage : test
58
+ script :
59
+ - npx nyc -s npm run test:node -- --bail
60
+ tags :
61
+ - win
62
+ artifacts :
63
+ paths :
64
+ - .nyc_output/
65
+
66
+ test-browser-chrome :
67
+ image : hugomrdias/node-chrome:test
68
+ stage : test
69
+ script :
70
+ - AEGIR_BROWSERS=ChromeDocker yarn test:browser
71
+ artifacts :
72
+ paths :
73
+ - coverage/
74
+
75
+ test-browser-firefox :
76
+ allow_failure : true
77
+ image : hugomrdias/node-firefox:test
78
+ stage : test
79
+ script :
80
+ - AEGIR_BROWSERS=FirefoxHeadless yarn test:browser
81
+ artifacts :
82
+ paths :
83
+ - coverage/
84
+
85
+ cov :
86
+ stage : cov
87
+ before_script : []
88
+ script :
89
+ - cp coverage/coverage-final.json .nyc_output/browser.json
90
+ - npx nyc report --reporter text-summary --reporter html
91
+ dependencies :
92
+ - linux-node-10
93
+ - win-node-10
94
+ - macos-node-10
95
+ - test-browser-chrome
96
+ artifacts :
97
+ paths :
98
+ - coverage/
99
+ coverage : ' /Lines : \d+\.\d+/'
Original file line number Diff line number Diff line change 45
45
"release-major" : " aegir release --type major -t node -t browser" ,
46
46
"coverage" : " aegir coverage" ,
47
47
"coverage-publish" : " aegir-coverage publish" ,
48
- "dep-check" : " npx dependency-check package.json './test/**/*.js' './src/**/*.js'"
48
+ "dep-check" : " npx dependency-check package.json './test/**/*.js' './src/**/*.js' -i electron-webrtc -i wrtc "
49
49
},
50
50
"repository" : {
51
51
"type" : " git" ,
71
71
"hat" : " 0.0.3" ,
72
72
"interface-ipfs-core" : " ~0.88.0" ,
73
73
"ipfsd-ctl" : " ~0.40.1" ,
74
+ "istanbul-instrumenter-loader" : " ^3.0.1" ,
75
+ "karma-coverage-istanbul-reporter" : " ^2.0.4" ,
74
76
"ncp" : " ^2.0.0" ,
75
77
"qs" : " ^6.5.2" ,
76
78
"rimraf" : " ^2.6.2" ,
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ describe('config', () => runOnAndOff((thing) => {
69
69
70
70
it ( 'call config with no arguments' , ( ) => {
71
71
return ipfs ( 'config' )
72
- . then ( out => expect ( out ) . to . include ( 'bin.js config <key> [value] ' ) )
72
+ . then ( out => expect ( out ) . to . include ( 'Not enough non-option arguments: got 0, need at least 1 ' ) )
73
73
} )
74
74
} )
75
75
You can’t perform that action at this time.
0 commit comments