mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Updated code coverage tool from deprecated istanbul to nyc
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -42,4 +42,5 @@ test/data/.temp
|
|||||||
*.orig
|
*.orig
|
||||||
|
|
||||||
# Prevent unit test coverage reports from being added
|
# Prevent unit test coverage reports from being added
|
||||||
.coverage
|
.coverage
|
||||||
|
.nyc_output
|
||||||
@@ -42,4 +42,5 @@ test/data/.temp
|
|||||||
*.orig
|
*.orig
|
||||||
|
|
||||||
# Prevent unit test coverage reports from being added
|
# Prevent unit test coverage reports from being added
|
||||||
.coverage
|
.coverage
|
||||||
|
.nyc_output
|
||||||
1029
package-lock.json
generated
1029
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -136,7 +136,7 @@
|
|||||||
"eslint-plugin-mocha": "5.2.0",
|
"eslint-plugin-mocha": "5.2.0",
|
||||||
"eslint-plugin-security": "1.4.0",
|
"eslint-plugin-security": "1.4.0",
|
||||||
"expect.js": "0.3.1",
|
"expect.js": "0.3.1",
|
||||||
"istanbul": "0.4.5",
|
"nyc": "14.1.1",
|
||||||
"mocha": "5.2.0",
|
"mocha": "5.2.0",
|
||||||
"parse-gitignore": "0.4.0"
|
"parse-gitignore": "0.4.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,17 +28,17 @@ echo -en "\033[0m\033[2mmocha `mocha --version`\033[0m";
|
|||||||
# set mocha reporter
|
# set mocha reporter
|
||||||
if [ "$CI" = "true" ]; then
|
if [ "$CI" = "true" ]; then
|
||||||
MOCHA_REPORTER="xunit";
|
MOCHA_REPORTER="xunit";
|
||||||
ISTANBUL_REPORT="--report cobertura";
|
COVERAGE_REPORT="--report cobertura";
|
||||||
else
|
else
|
||||||
MOCHA_REPORTER="spec";
|
MOCHA_REPORTER="spec";
|
||||||
ISTANBUL_REPORT="";
|
COVERAGE_REPORT="";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# delete old repor directory
|
# delete old repor directory
|
||||||
[ -d .coverage ] && rm -rf .coverage && mkdir .coverage;
|
[ -d .coverage ] && rm -rf .coverage && mkdir .coverage;
|
||||||
|
|
||||||
# run test
|
# run test
|
||||||
node --max-old-space-size=2048 node_modules/.bin/istanbul cover ${ISTANBUL_REPORT} \
|
node --max-old-space-size=2048 ./node_modules/.bin/nyc ${COVERAGE_REPORT} --report-dir ./.coverage \
|
||||||
--dir ./.coverage -x **/assets/** --print both _mocha -- \
|
-x **/assets/** --print both ./node_modules/.bin/_mocha \
|
||||||
--reporter ${MOCHA_REPORTER} --reporter-options output=${XUNIT_FILE} \
|
--reporter ${MOCHA_REPORTER} --reporter-options output=${XUNIT_FILE} \
|
||||||
test/system/*.test.js --recursive --prof --grep "$1";
|
test/system/*.test.js --recursive --prof --grep "$1";
|
||||||
|
|||||||
@@ -27,17 +27,17 @@ echo -en "\033[0m\033[2mmocha `mocha --version`\033[0m";
|
|||||||
# set mocha reporter
|
# set mocha reporter
|
||||||
if [ "$CI" = "true" ]; then
|
if [ "$CI" = "true" ]; then
|
||||||
MOCHA_REPORTER="xunit";
|
MOCHA_REPORTER="xunit";
|
||||||
ISTANBUL_REPORT="--report cobertura";
|
COVERAGE_REPORT="--report cobertura";
|
||||||
else
|
else
|
||||||
MOCHA_REPORTER="spec";
|
MOCHA_REPORTER="spec";
|
||||||
ISTANBUL_REPORT="";
|
COVERAGE_REPORT="";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# delete old repor directory
|
# delete old repor directory
|
||||||
[ -d .coverage ] && rm -rf .coverage && mkdir .coverage;
|
[ -d .coverage ] && rm -rf .coverage && mkdir .coverage;
|
||||||
|
|
||||||
# run test
|
# run test
|
||||||
node --max-old-space-size=2048 node_modules/.bin/istanbul cover ${ISTANBUL_REPORT} \
|
node --max-old-space-size=2048 ./node_modules/.bin/nyc ${COVERAGE_REPORT} --report-dir ./.coverage \
|
||||||
--dir ./.coverage -x **/assets/** --print both _mocha -- \
|
-x **/assets/** --print both ./node_modules/.bin/_mocha \
|
||||||
--reporter ${MOCHA_REPORTER} --reporter-options output=${XUNIT_FILE} \
|
--reporter ${MOCHA_REPORTER} --reporter-options output=${XUNIT_FILE} \
|
||||||
test/unit/*.test.js --recursive --prof --grep "$1";
|
test/unit/*.test.js --recursive --prof --grep "$1";
|
||||||
|
|||||||
Reference in New Issue
Block a user