Skip to content

Commit

Permalink
chore: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsMeBrianD committed Jan 14, 2025
1 parent e5c7cec commit 788212b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions e2e/dev-server-startup/tests/tests.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe('Dev Server Startup', () => {
stdio: 'pipe',
env: {
...process.env,
shell: true,
FORCE_COLOR: ''
}
});
Expand All @@ -32,6 +33,7 @@ describe('Dev Server Startup', () => {
let message = data.toString();

// remove any colors from message
// @eslint-disable-next-line
const colorRegex = /\x1b\[[0-9;]*m/g;
message = message.replace(colorRegex, '');

Expand All @@ -51,7 +53,6 @@ describe('Dev Server Startup', () => {
cleanup();
}
console.log('End state reached');

}
};
const onStderrData = (data) => {
Expand All @@ -60,9 +61,14 @@ describe('Dev Server Startup', () => {
// remove any colors from message
const colorRegex = /\x1b\[[0-9;]*m/g;
message = message.replace(colorRegex, '');
if (err.includes("error while starting dev server")) {
cleanup();
reject(new Error(message));
return;
}

console.error(message);
}
};
const onError = (err) => {
console.error(err);
cleanup();
Expand Down

0 comments on commit 788212b

Please sign in to comment.