Skip to content

Commit a2f8f29

Browse files
committed
test with coverage
1 parent 63f274d commit a2f8f29

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

.evergreen/config.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,12 @@ tasks:
174174

175175
buildvariants:
176176
- name: linux
177-
display_name: Ubuntu 22.04
178-
run_on: ubuntu2004-small
177+
display_name: RHEL 8.0
178+
run_on: rhel80-small
179179
tasks: [".node", ".browser"]
180-
- name: mac
181-
display_name: MacOS 10.14
182-
run_on: macos-1014
183-
tasks: [".node"]
184180
- name: lint
185181
display_name: lint
186-
run_on: ubuntu2004-small
182+
run_on: rhel80-small
187183
tasks:
188184
- run-checks
189185
- check-typescript-oldest

.evergreen/install-dependencies.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,9 @@ EOT
5858
# npm prepare runs after install and will compile the library
5959
# TODO(NODE-3555): rollup dependencies for node polyfills have broken peerDeps. We can remove this flag once we've removed them.
6060
npm install --legacy-peer-deps
61+
62+
set +o xtrace
63+
echo "Running: nvm use ${NODE_VERSION}"
6164
nvm use "${NODE_VERSION}" # Switch to the node version we want to test against
65+
echo "Success: switched to node $(node -v)"
66+
set -o xtrace

.evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
1313

1414
case $1 in
1515
"node")
16-
npm run check:test
16+
npm run check:coverage
1717
;;
1818
"browser")
1919
# TODO(NODE-3555): remove explicit browser tests

.nycrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
{
22
"extends": "@istanbuljs/nyc-config-typescript",
3-
"reporter": ["lcovonly", "text-summary", "html"]
3+
"reporter": [
4+
"lcovonly",
5+
"text-summary",
6+
"html"
7+
],
8+
"statements": 53,
9+
"branches": 38,
10+
"functions": 52,
11+
"lines": 54
412
}

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@
100100
"build:dts": "npm run build:ts && api-extractor run --typescript-compiler-folder node_modules/typescript --local && rimraf 'lib/**/*.d.ts*'",
101101
"build:bundle": "rollup -c rollup.config.mjs",
102102
"build": "npm run build:dts && npm run build:bundle",
103-
"check:lint": "eslint -v && eslint --ext '.js,.ts' --max-warnings=0 src test && tsc -v && tsc --noEmit && npm run test-tsd",
103+
"check:lint": "eslint -v && eslint --ext '.js,.ts' --max-warnings=0 src test && tsc -v && tsc --noEmit && npm run check:tsd",
104104
"format": "eslint --ext '.js,.ts' src test --fix",
105-
"coverage": "nyc npm run check-test",
106-
"coverage:html": "npm run coverage && open ./coverage/index.html",
105+
"check:coverage": "nyc --check-coverage npm run check:test",
107106
"prepare": "node etc/prepare.js",
108107
"release": "standard-version -i HISTORY.md"
109108
},

0 commit comments

Comments
 (0)