Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop excluding test modules when meteor.testModule found in package.j…
…son. (#10402) New Meteor apps have the following meteor.testModule in their package.json files by default "meteor": { "testModule": "tests/main.js" } When meteor.testModule is defined, it determines the test entry point when running the `meteor test` command, ignoring legacy file naming conventions like *.tests.js or *.app-tests.js. The package-source.js code changed by this commit was incorrect because it ignored those specially-named test files even when running tests, which was a problem if the meteor.testModule tried to import them explicitly, because they would not be properly compiled. If you're using meteor.testModule, the distinction between `meteor test` and `meteor test --full-app` matters a bit less, since the test entry point will be the same for both modes, though you can still check Meteor.isTest and Meteor.isAppTest at runtime to control test behavior.
- Loading branch information
Showing
5 changed files
with
72 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import assert from "assert"; | ||
|
||
export const name = module.id.split("/").pop(); | ||
|
||
describe(name, () => { | ||
it("should be imported", () => { | ||
assert.strictEqual(name, "imported.tests.js"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters