Skip to content

Increase verbosity of omit tests - #9055

Merged
dcousens merged 2 commits into
mainfrom
tidy-up-omit
Mar 6, 2024
Merged

dcousens merged 2 commits into
mainfrom
tidy-up-omit

Conversation

@dcousens

@dcousens dcousens commented Mar 6, 2024

Copy link
Copy Markdown
Member

When modifying code near to the omit functionality, I quickly found myself wanting amount of detail as to when and where the tests were failing.

Unlike tape and other testing suites, jest only really offers you insight into your tests from the test(description, () => ..., which you often might group a number of expects statements within. This isn't helpful when the tests are verifying a number of expectations at the same time.

This pull request changes that so we many tests, with 1 expectation each. This pattern is actually a huge performance win too, and I'll be using in my next pull request for hooks.

}()),
},
defaultIsFilterable: undefined,
defaultIsOrderable: undefined,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This code doesn't need to be testing defaults, we can do that elsewhere

@codesandbox-ci

codesandbox-ci Bot commented Mar 6, 2024 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 91ef98c:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens
dcousens merged commit d3a3a0e into main Mar 6, 2024
@dcousens
dcousens deleted the tidy-up-omit branch March 6, 2024 05:44
@dcousens dcousens mentioned this pull request Mar 28, 2024
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.

1 participant