mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
This means that the first command won't need to do a big build (and print lots of package changed notifications). Similar to what 'meteor create' does. Also add --prepare-app command.
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
var selftest = require('../selftest.js');
|
|
var Sandbox = selftest.Sandbox;
|
|
var utils = require('../utils.js');
|
|
var net = require('net');
|
|
var Future = require('fibers/future');
|
|
var _ = require('underscore');
|
|
var files = require('../files.js');
|
|
|
|
var MONGO_LISTENING =
|
|
{ stdout: " [initandlisten] waiting for connections on port" };
|
|
|
|
selftest.define("npm", ["net"], function () {
|
|
var s = new Sandbox({ fakeMongo: true });
|
|
var run;
|
|
|
|
s.createApp("npmtestapp", "npmtest", { dontPrepareApp: true });
|
|
s.cd("npmtestapp");
|
|
|
|
// Ensure that we don't lose the executable bits of npm modules.
|
|
// Regression test for https://github.com/meteor/meteor/pull/1808
|
|
// Before this fix, the module would work on the first execution but not on a
|
|
// subsequent one.
|
|
_.times(2, function (i) {
|
|
run = s.run("--once", "--raw-logs");
|
|
run.tellMongo(MONGO_LISTENING);
|
|
if (i === 0) {
|
|
run.waitSecs(2);
|
|
// use match instead of read because on a built release we can
|
|
// also get an update message here.
|
|
run.match(
|
|
"npm-test: updating npm dependencies -- meteor-test-executable...\n");
|
|
}
|
|
run.waitSecs(15);
|
|
run.match("null; From shell script\n");
|
|
run.expectEnd();
|
|
run.expectExit(0);
|
|
});
|
|
});
|