mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
This will be useful when we want to be smart with windows file paths later Also, all of the file calls are asynchronous with fibers now, which comes with many benefits. This is a combination of 23 commits. Original messages: Wrap a large number of fs calls inside files.* Convert a few more fs calls to files.* More moving fs.* to files Implement read/write streams and open/read/close Get rid of fs from auth.js Remove fs and unused imports from catalog-local and catalog-remote Remove unused imports from catalog.js Replace a whole lot of fs calls Fix error Migrate a lot more fs. calls to files. Add a temporary symlink method Convert old test to files.* Use files.pathX instead of path.x everywhere Replace path.x to files.pathX in tests Small fixes to files.js and one rename Make cleanup run in a fiber Make wrapping functions take function name in case we need it Add some timeouts and stuff to HCP tests wrapFsFunc also makes a sync version of the function Sometimes you just don't want to yield! Make sure JsImage readFromDisk doesn't yield Remove unused imports from npm test Change order of test now that some things don't yield Fix missing files import, and add a debug error printout
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
var selftest = require('../selftest.js');
|
|
var Sandbox = selftest.Sandbox;
|
|
var _ = require('underscore');
|
|
|
|
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);
|
|
});
|
|
});
|