Improve coverage support
This commit is contained in:
parent
ea62b572a5
commit
6aa0286cf0
|
@ -52,7 +52,7 @@ stage('build') {
|
||||||
jsdoc: doDockerBuild('jsdoc', {
|
jsdoc: doDockerBuild('jsdoc', {
|
||||||
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'docs/output', reportFiles: 'index.html', reportName: 'Docs'])
|
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'docs/output', reportFiles: 'index.html', reportName: 'Docs'])
|
||||||
}),
|
}),
|
||||||
linux_node_debug: doDockerBuild('node Debug', {
|
linux_node_debug: doDockerBuild('node-cover Debug', {
|
||||||
withCredentials([string(credentialsId: 'codecov-token-js', variable: 'CODECOV_TOKEN')]) {
|
withCredentials([string(credentialsId: 'codecov-token-js', variable: 'CODECOV_TOKEN')]) {
|
||||||
sh 'tests/node_modules/codecov/bin/codecov'
|
sh 'tests/node_modules/codecov/bin/codecov'
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,6 +370,32 @@ case "$TARGET" in
|
||||||
cd "$(mktemp -q -d -t realm.node.XXXXXX)"
|
cd "$(mktemp -q -d -t realm.node.XXXXXX)"
|
||||||
test_temp_dir=$PWD # set it to be cleaned at exit
|
test_temp_dir=$PWD # set it to be cleaned at exit
|
||||||
|
|
||||||
|
pushd "$SRCROOT/tests"
|
||||||
|
npm install
|
||||||
|
eval "$npm_tests_cmd"
|
||||||
|
popd
|
||||||
|
stop_server
|
||||||
|
;;
|
||||||
|
"node-cover")
|
||||||
|
npm run check-environment
|
||||||
|
if [ "$(uname)" = 'Darwin' ]; then
|
||||||
|
echo "downloading server"
|
||||||
|
download_server
|
||||||
|
echo "starting server"
|
||||||
|
start_server
|
||||||
|
|
||||||
|
npm_tests_cmd="npm run test-cover"
|
||||||
|
npm install --build-from-source=realm --realm_enable_sync
|
||||||
|
|
||||||
|
else
|
||||||
|
npm_tests_cmd="npm run test-cover"
|
||||||
|
npm install --build-from-source=realm
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Change to a temp directory.
|
||||||
|
cd "$(mktemp -q -d -t realm.node.XXXXXX)"
|
||||||
|
test_temp_dir=$PWD # set it to be cleaned at exit
|
||||||
|
|
||||||
pushd "$SRCROOT/tests"
|
pushd "$SRCROOT/tests"
|
||||||
npm install
|
npm install
|
||||||
eval "$npm_tests_cmd"
|
eval "$npm_tests_cmd"
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
"tmp": "^0.0.30",
|
"tmp": "^0.0.30",
|
||||||
"url-parse": "^1.1.7",
|
"url-parse": "^1.1.7",
|
||||||
"typescript": "^2.5.2",
|
"typescript": "^2.5.2",
|
||||||
"istanbul": "^0.3.2",
|
"istanbul": "^0.4.5",
|
||||||
"codecov": "^1.0.0"
|
"codecov": "^2.3.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"check-typescript" : "tsc --noEmit --alwaysStrict ./../lib/index.d.ts",
|
"check-typescript" : "tsc --noEmit --alwaysStrict ./../lib/index.d.ts",
|
||||||
"js-tests" : "istanbul cover jasmine spec/unit_tests.js",
|
"js-tests" : "jasmine spec/unit_tests.js",
|
||||||
"test": "npm run check-typescript && npm run js-tests"
|
"js-tests-cover" : "istanbul cover jasmine spec/unit_tests.js",
|
||||||
|
"test": "npm run check-typescript && npm run js-tests",
|
||||||
|
"test-cover": "npm run check-typescript && npm run js-tests-cover"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue