Skip to content

Commit 3aa953c

Browse files
authored
test(NODE-3236): separate unit from functional (#2991)
1 parent 7998956 commit 3aa953c

26 files changed

+78
-68
lines changed

.evergreen/run-checks.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ echo "Typescript $(npx tsc -v)"
1414
npx tsc --noEmit mongodb.ts34.d.ts
1515
# check that resolution uses the downleveled types
1616
echo "import * as mdb from '.'" > file.ts && npx tsc --noEmit --traceResolution file.ts | grep 'mongodb.ts34.d.ts' && rm file.ts
17+
18+
npm run check:unit

.mocharc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
],
77
"require": [
88
"ts-node/register",
9-
"source-map-support/register"
9+
"source-map-support/register",
10+
"test/tools/runner/chai-addons.js"
1011
],
11-
"file": "test/tools/runner",
1212
"ui": "test/tools/runner/metadata_ui.js",
1313
"recursive": true,
1414
"timeout": 60000,

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,25 @@
100100
"build:dts": "npm run build:ts && api-extractor run && rimraf 'lib/**/*.d.ts*' && downlevel-dts mongodb.d.ts mongodb.ts34.d.ts",
101101
"build:docs": "typedoc",
102102
"check:bench": "node test/benchmarks/driverBench",
103-
"check:coverage": "nyc npm run check:test",
103+
"check:coverage": "nyc npm run test:all",
104104
"check:lint": "npm run build:dts && npm run check:dts && npm run check:eslint && npm run check:tsd",
105105
"check:eslint": "eslint -v && eslint --max-warnings=0 --ext '.js,.ts' src test",
106106
"check:tsd": "tsd --version && tsd",
107107
"check:dts": "tsc --noEmit mongodb.d.ts && tsd",
108-
"check:test": "mocha --recursive test/functional test/unit",
108+
"check:test": "mocha --file test/tools/runner --recursive test/functional",
109+
"check:unit": "mocha --recursive test/unit/",
109110
"check:ts": "tsc -v && tsc --noEmit",
110111
"check:atlas": "mocha --config \"test/manual/mocharc.json\" test/manual/atlas_connectivity.test.js",
111-
"check:adl": "mocha test/manual/data_lake.test.js",
112+
"check:adl": "mocha --file test/tools/runner test/manual/data_lake.test.js",
112113
"check:ocsp": "mocha --config \"test/manual/mocharc.json\" test/manual/ocsp_support.test.js",
113114
"check:kerberos": "mocha --config \"test/manual/mocharc.json\" test/manual/kerberos.test.js",
114115
"check:tls": "mocha --config \"test/manual/mocharc.json\" test/manual/tls_support.test.js",
115116
"check:ldap": "mocha --config \"test/manual/mocharc.json\" test/manual/ldap.test.js",
116117
"check:csfle": "mocha test/functional/client_side_encryption",
117118
"prepare": "node etc/prepare.js",
118119
"release": "standard-version -i HISTORY.md",
119-
"test": "npm run check:lint && npm run check:test"
120+
"test": "npm run check:lint && npm run test:all",
121+
"test:all": "npm run check:unit && npm run check:test"
120122
},
121123
"tsd": {
122124
"directory": "test/types",
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)