WIP: Unbreak meteor test-packages

This commit is contained in:
Avital Oliver
2016-02-15 21:39:07 -08:00
parent a335875e19
commit e4048680ce
2 changed files with 7 additions and 2 deletions

View File

@@ -464,7 +464,7 @@ function doTestCommand(options) {
// As long as the Meteor CLI runs a single command as part of each
// process, this should be safe.
global.testCommandMetadata = {
testRunnerPackage: options['test-runner-package']
driverPackage: options['driver-package']
};
Console.setVerbose(!!options.verbose);

View File

@@ -952,7 +952,12 @@ export var fullLink = Profile("linker.fullLink", function (inputFiles, {
var weAreLinkingTheApp = (name === null);
if (weAreLinkingTheApp) {
prelinkedFiles.push({
source: "if (Meteor.isClient) Meteor.startup(function() { Package[\"practicalmeteor:mocha\"].runTests(); });",
source: `\
if (Meteor.isClient) {
Meteor.startup(function() {
Package[\"${global.testCommandMetadata.driverPackage}\"].runTests();
});
}`,
servePath: "/packages/runTests.js"
});
}