Skip to content

test(NODE-4059): Change Stream test typescripting and unified builder fixes #3224

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
Apr 29, 2022

Conversation

nbbeeken
Copy link
Contributor

Description

What is changing?

Break out of test changes for #3191

Is there new documentation needed for these changes?

What is the motivation for this change?

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken nbbeeken changed the title NODE-4059/changeStream-test-cleanup test(NODE-4059): Change Stream test typescripting and unified builder fixes Apr 28, 2022
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

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

In change_stream.test.ts there are some TODOs without Jira tickets linked. Otherwise, changes look good

@@ -1,18 +1,17 @@
'use strict';
import { expect } from 'chai';
import * as path from 'path';
Copy link
Contributor

Choose a reason for hiding this comment

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

This is entirely unrelated to your PR but this is something I've wondered. I see we sometimes use import * as path from 'path' but we don't import other NodeJS modules the same way. Is there a reason we don't destructure path specifically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer doing this for path beacuse join is such a genericly named function, so path.join is more indicative of the functionality. It's not like we have many joins runnning around though.

const dbName = 'changestream_integration_test';
const collectionName = 'test';

// TODO remove withClient and withChangeStream usage, use mocha hooks
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a jira ticket to go with this TODO? Otherwise, can we create one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, NODE-2764

fullDocument: 'updateLookup',
// @ts-expect-error: NODE-XXXX is this a type bug? requires locale
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I looked it up this was just incorrect usage, you need to pass in a locale

@nbbeeken nbbeeken marked this pull request as ready for review April 29, 2022 18:37
@baileympearson baileympearson merged commit 5e465b7 into main Apr 29, 2022
@baileympearson baileympearson deleted the NODE-4059/changeStream-test-cleanup branch April 29, 2022 19:14
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.

3 participants