Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,17 @@
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off"
}
},
"overrides": [
{
"parser": "espree",
"files": [
"*.mjs"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": "latest"
}
}
]
}
71 changes: 14 additions & 57 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,46 +92,6 @@ functions:
- ${PROJECT_DIRECTORY}/.evergreen/run-typescript.sh

tasks:
- name: node-tests-v6
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 6
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v8
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 8
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v10
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 10
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v12
tags: ["node"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 12
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: node
- name: node-tests-v14
tags: ["node"]
commands:
Expand Down Expand Up @@ -162,16 +122,17 @@ tasks:
- func: run tests
vars:
TEST_TARGET: node
- name: browser-tests
tags: ["browser"]
commands:
- func: fetch source
vars:
NODE_MAJOR_VERSION: 16
- func: install dependencies
- func: run tests
vars:
TEST_TARGET: browser
# TODO(NODE-3555): Karma tests pass locally still after these changes, rhel80 is just missing chrome
# - name: browser-tests
# tags: ["browser"]
# commands:
# - func: fetch source
# vars:
# NODE_MAJOR_VERSION: 16
# - func: install dependencies
# - func: run tests
# vars:
# TEST_TARGET: browser
- name: run-checks
tags:
- run-checks
Expand Down Expand Up @@ -214,16 +175,12 @@ tasks:

buildvariants:
- name: linux
display_name: Ubuntu 22.04
run_on: ubuntu2004-small
tasks: [".node", ".browser"]
- name: mac
display_name: MacOS 10.14
run_on: macos-1014
display_name: RHEL 8.0
run_on: rhel80-small
tasks: [".node"]
- name: lint
display_name: lint
run_on: ubuntu2004-small
run_on: rhel80-small
tasks:
- run-checks
- check-typescript-oldest
Expand Down
9 changes: 8 additions & 1 deletion .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,12 @@ registry=https://registry.npmjs.org
EOT

# install node dependencies
npm install # npm prepare runs after install and will compile the library
# npm prepare runs after install and will compile the library
# TODO(NODE-3555): rollup dependencies for node polyfills have broken peerDeps. We can remove this flag once we've removed them.
npm install --legacy-peer-deps

set +o xtrace
echo "Running: nvm use ${NODE_VERSION}"
nvm use "${NODE_VERSION}" # Switch to the node version we want to test against
echo "Success: switched to node $(node -v)"
set -o xtrace
2 changes: 1 addition & 1 deletion .evergreen/run-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

npm run lint
npm run check:lint
3 changes: 2 additions & 1 deletion .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"

case $1 in
"node")
npm run test-node
npm run check:coverage
;;
"browser")
# TODO(NODE-3555): remove explicit browser tests
npm run test-browser
;;
*)
Expand Down
17 changes: 17 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/mocharc.json",
"require": [
"source-map-support/register",
"ts-node/register",
"./node_modules/chai/register-expect"
],
"extension": [
"js",
"ts"
],
"recursive": true,
"timeout": 10000,
"failZero": true,
"sort": true,
"color": true
}
10 changes: 9 additions & 1 deletion .nycrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"reporter": ["lcovonly", "text-summary", "html"]
"reporter": [
"lcovonly",
"text-summary",
"html"
],
"statements": 53,
"branches": 38,
"functions": 52,
"lines": 54
}
Loading