mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
- fix tests on safetybelt
- garantee fibers is disabled when run travis tests
This commit is contained in:
@@ -4,12 +4,14 @@ Package.describe({
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
api.use("ecmascript");
|
||||
api.use("webapp", "server");
|
||||
api.addFiles("reload-safety-belt.js", "server");
|
||||
api.addAssets("safetybelt.js", "server");
|
||||
});
|
||||
|
||||
Package.onTest(function (api) {
|
||||
api.use("ecmascript");
|
||||
api.addAssets("safetybelt.js", "server");
|
||||
api.use(["reload-safetybelt", "tinytest", "http", "webapp", "underscore"]);
|
||||
api.addFiles("reload-safety-belt-tests.js", "server");
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
var script = Assets.getText("safetybelt.js");
|
||||
await (async () => {
|
||||
var script = await Assets.getText("safetybelt.js");
|
||||
|
||||
Tinytest.add("reload-safetybelt - safety belt is added", function (test) {
|
||||
test.isTrue(_.some(
|
||||
WebAppInternals.additionalStaticJs,
|
||||
function (js, pathname) {
|
||||
return js === script;
|
||||
}
|
||||
));
|
||||
});
|
||||
Tinytest.add("reload-safetybelt - safety belt is added", function (test) {
|
||||
test.isTrue(
|
||||
_.some(WebAppInternals.additionalStaticJs, function (js, pathname) {
|
||||
return js === script;
|
||||
})
|
||||
);
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
// chance of hitting an old server for the HTML and the new server for the JS or
|
||||
// CSS. This prevents you from displaying the page in that case, and instead
|
||||
// reloads it, presumably all on the new version now.
|
||||
WebAppInternals.addStaticJs(Assets.getText("safetybelt.js"));
|
||||
await (async () => {
|
||||
WebAppInternals.addStaticJs(await Assets.getText("safetybelt.js"));
|
||||
})();
|
||||
|
||||
@@ -10,6 +10,10 @@ export METEOR_HOME=`pwd`
|
||||
|
||||
export phantom=$phantom
|
||||
|
||||
# force fibers to be disabled
|
||||
export DISABLE_FIBERS=1
|
||||
export IGNORE_ASYNC_PLUGIN=1
|
||||
|
||||
# only install dependencies if required
|
||||
if [ "$phantom" = true ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user