-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update some tests and config to be more maintainable (#12356)
* test(shard): reset text color after printing * chore: convert "mocha.opts" to ".mocharc.yml" * test: change uri parsing to be consistent across both uri's * test(model): use "equal" to check against "0" count, for better test debugging (to see the actual count instead of "falsy value) * test: refactor global setting of "uri" alias to using "start.uri" instead this change is needed, because "start.uri" is now a getter and global variables in mocha get envaluated before a global-setup also change some static connection strings to use "start.uri" * test(common): move available databases to their own value for use in "useDb" instead of combined with just the URI * test(connection): change to use database 2 instead of custom defined * test(model.populate): change to use database 2 instead of custom defined * test(connection): change to use database 1 instead of custom defined * test(model.populate): use global "db" connection instead of creating a new one * test(connection): change to use database 2 instead of custom defined (again) * test(common): change replset static databases to defined "databases" * test(model.populate): handle "db2" in "afterEach" instead of the tests themself * test(model.populate): handle dropping database for "db2" outside of test itself * test(connection.test): update uri extraction regex to support multiple ip:port's for replset
- Loading branch information
Showing
9 changed files
with
86 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
reporter: spec # better to identify failing / slow tests than "dot" | ||
ui: bdd # explicitly setting, even though it is mocha default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.