-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use meteor.{mainModule,testModule} for
meteor create
starter apps.
In order for Meteor to maintain its commitment to being a zero-configuration tool, any configuration options that we add must come pre-configured in the best way possible for newly created apps. In particular, the default new Meteor app must contain a reasonable testing story, or else we are signalling to the community that testing is an afterthought. With that said, this PR is still a work in progress. I welcome your feedback on how best to configure the default `meteor create` starter app. Builds on #9690 and #9714.
- Loading branch information
Ben Newman
committed
Mar 1, 2018
1 parent
a770e99
commit d557078
Showing
2 changed files
with
39 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import assert from "assert"; | ||
|
||
export const testMessage = "Welcome to Meteor!"; | ||
|
||
describe("~name~", () => { | ||
it("package.json has correct name", () => { | ||
const { name } = require("../package.json"); | ||
assert.strictEqual(name, "~name~"); | ||
}); | ||
|
||
if (Meteor.isClient) { | ||
it("client is not server", () => { | ||
assert.strictEqual(Meteor.isServer, false); | ||
}); | ||
} | ||
|
||
if (Meteor.isServer) { | ||
it("server is not client", () => { | ||
assert.strictEqual(Meteor.isClient, false); | ||
}); | ||
} | ||
|
||
it("async/await and dynamic import()", async () => { | ||
const tests = await import("./main.js"); | ||
assert.strictEqual(tests.testMessage, testMessage); | ||
}); | ||
}); |