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 note on testInDebug #4240

Merged
merged 1 commit into from
Mar 18, 2016
Merged

Add note on testInDebug #4240

merged 1 commit into from
Mar 18, 2016

Conversation

courajs
Copy link
Contributor

@courajs courajs commented Mar 18, 2016

Addresses point 4 in Issue #4238

## Writing Tests

* We do write tests for our warns and assertion messages. You may use the `assert.expectAssertion()` and `assert.expectWarning()` helpers for this. Note: Our Travis tests that will run on your PR run in the `production` envrionment, where warnings and assertions are stripped. If you're writing a test for these, you should use `testInDebug` helper rather than `test` to define your test.

Copy link
Member

Choose a reason for hiding this comment

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

Typo: envrionment -> environment

I think it would be good to add a small sample which clarifies where to import that testInDebug helper from and how it is used instead of test...

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'll link to an existing test using it

Copy link
Member

Choose a reason for hiding this comment

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

That's good also! Just in case you haven't thought already about that: I would suggest a link using the specific commit, and not master, so the link stays resilient to changes. You can achieve that by pressing y to get the canonical form: https://help.github.com/articles/getting-permanent-links-to-files/.

Addresses point 4 in Issue emberjs#4238
bmac added a commit that referenced this pull request Mar 18, 2016
Add note on `testInDebug`
@bmac bmac merged commit c78d7f0 into emberjs:master Mar 18, 2016
@bmac
Copy link
Member

bmac commented Mar 18, 2016

Thanks @courajs

@courajs courajs deleted the patch-2 branch March 18, 2016 16:54
@pangratz pangratz mentioned this pull request Mar 18, 2016
5 tasks
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