forked from meteor/meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnpm.js
More file actions
38 lines (34 loc) · 1.18 KB
/
npm.js
File metadata and controls
38 lines (34 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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");
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);
});
});