@@ -56,45 +56,10 @@ We recommended these VS Code extensions:
56
56
57
57
58
58
59
- ### Running the Tests
59
+ ### Automated Tests
60
60
61
- Start a mongod standalone with our [ cluster_setup.sh ] ( test/tools/cluster_setup.sh ) script: ` ./test/tools/cluster_setup.sh server `
61
+ This repo contains a suite of automated tests. See the [ Testing README ] ( / test/readme.md ) for more details.
62
62
63
- Then run the tests: ` npm test `
64
-
65
- See [ test/readme.md] ( test/readme.md ) for more information on testing in a special environment like CSFLE or Serverless.
66
-
67
- ### Tests FAQ
68
-
69
- - How can I run the tests against more than a standalone?
70
-
71
- You can use ` test/tools/cluster_setup.sh replica_set ` to start a replica set.
72
-
73
- If you are running more than a standalone server, make sure your ` ulimit ` settings are in accordance with
74
- [ MongoDB's recommendations] [ mongodb-ulimit ] .
75
- Changing the settings on the latest versions of macOS can be tricky. See [ this article] [ macos-ulimt ]
76
- for tips. (You likely don't need to do the complicated maxproc steps.)
77
-
78
- You can prefix ` npm test ` with a ` MONGODB_URI ` environment variable to point the tests to a specific deployment:
79
- ` env MONGODB_URI=mongodb://localhost:27017 npm test `
80
-
81
- - How can I run just one test?
82
-
83
- The easiest way to run a single test is by appending ` .only() ` to the suite or test you want to run.
84
- For example, you could update a test function to be ` it.only(‘cool test’, function() {}) ` . Then
85
- run the test using ` npm run check:test ` for a functional or integration test or
86
- ` npm run check:unit ` for a unit test. See [ Mocha's documentation] [ mocha-only ]
87
- for more detailed information on ` .only() ` .
88
-
89
- Another way to run a single test is to use Mocha's ` grep ` flag. For functional or integration tests,
90
- run ` npm run check:test -- -g 'test name' ` . For unit tests, run ` npm run check:unit -- -g 'test name' ` .
91
- See the [ Mocha documentation] [ mocha-grep ] for information on the ` grep ` flag.
92
-
93
- - Why are some of the tests "pending"?
94
-
95
- Tests that we have indicated should be skipped using ` .skip() ` will appear as pending in the test
96
- results. See
97
- [ Mocha's documentation] [ mocha-skip ] for more information.
98
63
99
64
### Commit messages
100
65
@@ -188,11 +153,5 @@ Reviewers should use the following questions to evaluate the implementation for
188
153
[ mtools-install ] : http://blog.rueckstiess.com/mtools/install.html
189
154
[ nvm-windows ] : https://github.com/coreybutler/nvm-windows#installation--upgrades
190
155
[ nvm-unix ] : https://github.com/nvm-sh/nvm#install--update-script
191
- [ macos-ulimt ] : https://wilsonmar.github.io/maximum-limits/
192
156
[ workspace-file ] : https://gist.githubusercontent.com/nbbeeken/d831a3801b4c463648c077b27da5057b/raw/8e986843e5e28019f7c0cebe5c6fa72407bf8afb/node-mongodb-native.code-workspace
193
- [ mongodb-ulimit ] : https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
194
- [ mocha-only ] : https://mochajs.org/#exclusive-tests
195
- [ mocha-grep ] : https://mochajs.org/#command-line-usage
196
- [ mocha-ulimit ] : https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
197
- [ mocha-skip ] : https://mochajs.org/#inclusive-tests
198
157
[ node-jira ] : https://jira.mongodb.org/browse/NODE
0 commit comments