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

Build: Move wrap/unwrap helpers to testUtils #216

Merged
merged 3 commits into from
Nov 4, 2021

Conversation

edg2s
Copy link
Contributor

@edg2s edg2s commented Nov 3, 2021

No description provided.

@edg2s edg2s changed the title test utils Build: Move wrap/unwrap helpers to testUtils Nov 3, 2021


//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------

function wrap(assertionCode, testName = "Name") {
Copy link
Contributor Author

@edg2s edg2s Nov 3, 2021

Choose a reason for hiding this comment

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

Some versions of wrap contained a testName argument, but it was never used. If it's needed in the future it can be added back.

@coveralls
Copy link

coveralls commented Nov 3, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 15d91e8 on edg2s:test-utils into ad5f79f on platinumazure:master.

@@ -0,0 +1,13 @@
/**
Copy link
Member

@bmish bmish Nov 3, 2021

Choose a reason for hiding this comment

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

I would add this to tests/utils/wrap.js instead, so eventually we can have multiple test util files.

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 used the same structure as the non-test utils in lib/utils.js, should they not be the same?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can split into multiple utility files later if needed.

Copy link
Member

Choose a reason for hiding this comment

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

Will improve util organization later then.

Copy link
Collaborator

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

Saw one comment change which needs to be reverted.

Would it make more sense to name the methods "wrapInTest" and "wrapInArrowTest", or similar? Asking in case we create other wrap methods later, such as module wrappers.


// unwrapped
// untestUtils.wrapped
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume this should be reverted

@@ -0,0 +1,13 @@
/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can split into multiple utility files later if needed.

Copy link
Collaborator

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for making the changes!

@platinumazure platinumazure merged commit eeab17c into qunitjs:master Nov 4, 2021
@edg2s edg2s deleted the test-utils branch November 4, 2021 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants