Skip to content

Commit 956d137

Browse files
committed
Deduplicate error messages
1 parent 46aa00f commit 956d137

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

addon-test-support/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,19 @@ let fetchFromEmberCli = async function(url, headers) {
5050
response = await fetch(endpoint);
5151
} catch (e) {
5252
if (e.message && e.message.match(/^Mirage:/)) {
53-
error = `Ember CLI FastBoot Testing: It looks like Mirage is intercepting ember-cli-fastboot-testing's attempt to render ${url}. Please disable Mirage when running FastBoot tests.`;
53+
error = `It looks like Mirage is intercepting ember-cli-fastboot-testing's attempt to render ${url}. Please disable Mirage when running FastBoot tests.`;
5454
} else {
55-
error = `Ember CLI FastBoot Testing: We were unable to render ${url}. Is your test suite blocking or intercepting HTTP requests? Error: ${e.message ? e.message : e}.`
55+
error = `We were unable to render ${url}. Is your test suite blocking or intercepting HTTP requests? Error: ${e.message ? e.message : e}.`
5656
}
5757
}
5858

5959
if (response && response.headers && response.headers.get && response.headers.get('x-fastboot-testing') !== 'true') {
60-
error = `Ember CLI FastBoot Testing: We were unable to render ${url}. Is your test suite blocking or intercepting HTTP requests?`;
60+
error = `We were unable to render ${url}. Is your test suite blocking or intercepting HTTP requests?`;
6161
}
6262

6363
if (error) {
64+
error = `Ember CLI FastBoot Testing: ${error}`;
65+
6466
// eslint-disable-next-line no-console
6567
console.error(error);
6668
throw new Error(error);

0 commit comments

Comments
 (0)