Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

Update testing section for Meteor 1.7 #173

Merged
merged 10 commits into from
Apr 27, 2019

Conversation

cur33
Copy link
Contributor

@cur33 cur33 commented Jun 7, 2018

The lack of any mention of the new 'testModule' feature in package.json after the Meteor 1.7 release threw me off as a new Meteor user going through the Angular tutorial yesterday, so I updated all three tutorials to reflect the change. Please let me know if my additions should be worded differently, or feel free to make the changes yourself.

@apollo-cla
Copy link

@cur33: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

Copy link
Contributor

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this! We should probably document meteor.mainModule in the same way, but that doesn't have to be part of this PR.

@@ -12,6 +12,9 @@ To do so, we'll add a [test driver](http://guide.meteor.com/testing.html#test-dr
meteor add practicalmeteor:mocha
```

> ### New testing feature
> While the `meteor test ...` command does still work as specified below, the release of Meteor 1.7 includes a new feature which allows you to specify the location of the test module in `package.json` with a property named `"testModule"`, which you can read more about [in the changelog](https://docs.meteor.com/changelog.html#v1720180528). In order to get the expected behavior, such that the `meteor test ...` command only uses files whose names match the format `*.test[s].*` or `*.spec[s].*`, you should either remove the line `"testModule": "tests/main.js"` from your `package.json` file, or change it to an appropriate value, before running `meteor test ...`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we mention that "testModule" need to appear inside a "meteor" section of package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not a bad idea. I considered it, but the section was already pretty long, so I decided against. I could go either way on it, though.

@cur33
Copy link
Contributor Author

cur33 commented Jun 10, 2018

No problem. That's a good idea to include meteor.mainModule; I didn't really think to because the presence of meteor.testModule was the only one that actually broke the tutorial. I noticed that the Meteor Guide (and likely the API) also need to be updated for these changes, but obviously those are separate repos.

@cur33
Copy link
Contributor Author

cur33 commented Jun 10, 2018

@benjamn Added a clarification! Let me know if you think that makes more sense.

@serut
Copy link

serut commented Nov 10, 2018

This should be already fixed !!

@corourke
Copy link

Guys, why has this not been merged in? I just wasted 2 hours on this issue! Ahhhgg!

@abernix abernix merged commit f51ee70 into meteor:master Apr 27, 2019
@benjamn
Copy link
Contributor

benjamn commented Apr 27, 2019

Thanks for merging @abernix, and thanks to @cur33 for identifying and fixing this problem!

@cur33
Copy link
Contributor Author

cur33 commented May 2, 2019

You're welcome! I'm glad this finally got added. Thanks to @abernix!

@cur33 cur33 deleted the update-testing-section branch May 2, 2019 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants