mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Many of these (mostly in top level commands in commands-packages.js) are not super well thought out: they use a new "doOrDie" helper to run some function in a capture and exit if there are any messages. We really need to get a little more thoughtful about the big picture of error handling (combining "build" errors, network errors, catalog errors, etc). But this at least allows the addition of more buildmessage assertions. At the very least, this ensures that if you edit a package.js in a local package while "meteor run" is running, that instead of crashing the tool it properly shows the buildmessage and lets you fix the issue.
30 lines
714 B
JavaScript
30 lines
714 B
JavaScript
var selftest = require('../selftest.js');
|
|
var Sandbox = selftest.Sandbox;
|
|
var files = require('../files.js');
|
|
|
|
selftest.define("selftest-from-warehouse", ['checkout'], function () {
|
|
var s = new Sandbox({
|
|
warehouse: {
|
|
v1: { recommended: true},
|
|
v2: { recommended: true }
|
|
}
|
|
});
|
|
var run;
|
|
|
|
var toolsPackage;
|
|
selftest.doOrThrow(function() {
|
|
toolsPackage = selftest.getToolsPackage();
|
|
});
|
|
var toolsVersion = toolsPackage.name + '@' +
|
|
toolsPackage.version;
|
|
|
|
// Create an app with the latest release.
|
|
run = s.run("self-test", "do-nothing");
|
|
run.waitSecs(15);
|
|
run.expectExit(0);
|
|
});
|
|
|
|
selftest.define("do-nothing", function () {
|
|
selftest.expectEqual(true, true);
|
|
});
|