From ad6f1094b219f5e700cf12fe53558268bca9f660 Mon Sep 17 00:00:00 2001 From: bekzod Date: Mon, 5 Jun 2017 15:04:30 +0500 Subject: [PATCH] updated error message --- src/ember-app.js | 6 +++--- test/fastboot-test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ember-app.js b/src/ember-app.js index c05a2cc..62d7b1e 100644 --- a/src/ember-app.js +++ b/src/ember-app.js @@ -230,14 +230,14 @@ class EmberApp { return this.buildAppInstance() .then(instance => { result.instance = instance; - return new Promise(function(resolve, reject) { + return new Promise((resolve, reject) => { let timer; if (destroyAppInstanceInMs > 0) { // start a timer to destroy the appInstance forcefully in the given ms. // This is a failure mechanism so that node process doesn't get wedged if the `visit` never completes. - timer = setTimeout(()=> { + timer = setTimeout(() => { if (result._destroyAppInstance()) { - reject(new Error('App instance was forcefully destroyed in ' + destroyAppInstanceInMs + 'ms')); + reject(new Error('Fastboot forcefully destroyed App instance in ' + destroyAppInstanceInMs + 'ms')); } }, destroyAppInstanceInMs); } diff --git a/test/fastboot-test.js b/test/fastboot-test.js index 788987e..37fe20e 100644 --- a/test/fastboot-test.js +++ b/test/fastboot-test.js @@ -106,9 +106,9 @@ describe("FastBoot", function() { distPath: fixture('long-resolving-app') }); - fastboot.visit('/', { destroyAppInstanceInMs: 300 }) + fastboot.visit('/', { destroyAppInstanceInMs: 5 }) .catch((e) => { - expect(e.message).to.equal('App instance was forcefully destroyed in 300ms'); + expect(e.message).to.equal('Fastboot forcefully destroyed App instance in 5ms'); done(); }); });