Skip to content
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

Add docs and tests for normalize #178

Merged
merged 10 commits into from
Aug 16, 2021
Merged

Add docs and tests for normalize #178

merged 10 commits into from
Aug 16, 2021

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Aug 12, 2021

Inline documentation and tests have been added for the normalize function. Only one test was added; the rest were pre-existing. They were grouped together and updated to match our typical testing conventions.

@Gudahtt Gudahtt requested a review from a team as a code owner August 12, 2021 21:51
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

I imagine the purpose of the object test case is to prove to ourselves that inputs that are neither strings nor numbers will be rejected. That being the case, I think we should either note that, or just test a bunch of primitives as well, perhaps by iterating over an array of bad inputs.

src/index.ts Outdated Show resolved Hide resolved
@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 16, 2021

Good idea! I've added tests for all primitive types. I caught some unexpected behaviour for undefined, and null, so that was interesting.

Inline documentation and tests have been added for the `normalize`
function. Only one test was added; the rest were pre-existing. They
were grouped together and updated to match our typical testing
conventions.
src/index.test.ts Outdated Show resolved Hide resolved
src/index.test.ts Outdated Show resolved Hide resolved
src/index.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

LGTM!

rekmarks
rekmarks previously approved these changes Aug 16, 2021
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

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

No, it actually LGTM!

src/index.test.ts Outdated Show resolved Hide resolved
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
@Gudahtt Gudahtt merged commit 7bd7607 into main Aug 16, 2021
@Gudahtt Gudahtt deleted the add-normalize-tests branch August 16, 2021 19:22
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