Skip to content

test: more Unified runner operations #2730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 8, 2021
Merged

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Feb 3, 2021

Adds a number of operations, makes use of chai expect instead of boolean
for assertions to track stack traces, adds session and bucket entity
types. Passes utilClient through to operation functions which are"
inlined into the operations map to get type checking to work.
Modifies url helper function to make multipleMongoses detection work.

@nbbeeken nbbeeken force-pushed the NODE-2287/UnifiedTestFormat-4 branch 2 times, most recently from 87d48fc to fb049bf Compare February 3, 2021 18:54
Adds a number of operations, makes use of chai expect instead of boolean
for assertions to track stack traces, adds session and bucket entity
types. Passes utilClient through to operation functions which are"
inlined into the operations map to get type checking to work.
Modifies url helper function to make multipleMongoses detection work.
@nbbeeken nbbeeken force-pushed the NODE-2287/UnifiedTestFormat-4 branch from fb049bf to 7366597 Compare February 3, 2021 19:45
@nbbeeken nbbeeken requested review from emadum and durran February 4, 2021 15:39
@nbbeeken nbbeeken marked this pull request as ready for review February 4, 2021 15:39
@nbbeeken
Copy link
Contributor Author

nbbeeken commented Feb 4, 2021

Working on the few failures left, but shouldn't be drastic so I think this is ready for a look, thanks!

Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor request but LGTM 👍

throw new Error(`Assertions need ${error} to be a MongoError`);
// if statement asserts type for TS, expect will always fail
expect(error).to.be.instanceOf(MongoError);
return;
}

if (expected.errorCode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be better to do if (expected.errorCode != null) here and in the other checks to allow for expectations with false-y values.

@nbbeeken nbbeeken merged commit d0f798d into 4.0 Feb 8, 2021
@nbbeeken nbbeeken deleted the NODE-2287/UnifiedTestFormat-4 branch February 8, 2021 18:40
ljhaywar pushed a commit that referenced this pull request Nov 9, 2021
Adds a number of operations, makes use of chai expect instead of boolean
for assertions to track stack traces, adds session and bucket entity
types. Passes utilClient through to operation functions which are
inlined into the operations map to get type checking to work.
Modifies url helper function to make multipleMongoses detection work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants