Skip to content

Commit b32c63d

Browse files
committed
Ensure test artifacts are present and browser tests are executed
1 parent fc4e9a2 commit b32c63d

File tree

6 files changed

+2721
-3
lines changed

6 files changed

+2721
-3
lines changed

packages/sdk-crypto/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ node_modules
22
lib/*.js
33
lib/*.js.map
44
test/*.js
5-
test/*.js.map
5+
test/*.js.map
6+
!vendor/*.js
7+
!karma.conf.js
8+
!allbrowsers.conf.js
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = function(config) {
2+
config.set({
3+
basePath: '',
4+
frameworks: [
5+
'browserify',
6+
'mocha',
7+
'detectBrowsers'
8+
],
9+
files: [
10+
'vendor/es6-promise.auto.js',
11+
'test/*Tests.js'
12+
],
13+
exclude: [
14+
'test/Node*Tests.js'
15+
],
16+
preprocessors: {
17+
'test/*Tests.js': ['browserify']
18+
},
19+
reporters: ['progress'],
20+
port: 9876,
21+
colors: true,
22+
logLevel: config.LOG_WARN,
23+
autoWatch: false,
24+
singleRun: true,
25+
concurrency: 2
26+
})
27+
};

packages/sdk-crypto/karma.conf.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = function(config) {
2+
config.set({
3+
basePath: '',
4+
frameworks: [
5+
'browserify',
6+
'mocha'
7+
],
8+
files: [
9+
'vendor/es6-promise.auto.js',
10+
'test/*Tests.js'
11+
],
12+
exclude: [
13+
'test/Node*Tests.js'
14+
],
15+
preprocessors: {
16+
'test/*Tests.js': ['browserify']
17+
},
18+
reporters: ['progress'],
19+
port: 9876,
20+
colors: true,
21+
logLevel: config.LOG_WARN,
22+
autoWatch: false,
23+
browsers: ['HeadlessChrome'],
24+
singleRun: true,
25+
concurrency: Infinity,
26+
customLaunchers: {
27+
HeadlessChrome: {
28+
base: 'Chrome',
29+
flags: [
30+
'--no-sandbox',
31+
'--headless',
32+
'--disable-gpu',
33+
'--remote-debugging-port=9222'
34+
]
35+
}
36+
}
37+
})
38+
};

packages/sdk-crypto/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"prepublishOnly": "tsc",
99
"pretest": "tsc",
10-
"test": "mocha"
10+
"test": "mocha && karma start"
1111
},
1212
"author": "[email protected]",
1313
"license": "UNLICENSED",
@@ -30,7 +30,6 @@
3030
"karma-opera-launcher": "^1.0.0",
3131
"karma-phantomjs-launcher": "^1.0.2",
3232
"karma-safari-launcher": "^1.0.0",
33-
"karma-safaritechpreview-launcher": "0.0.5",
3433
"mocha": "^3.2.0",
3534
"sjcl": "^1.0.6",
3635
"typescript": "^2.2.2"

0 commit comments

Comments
 (0)