Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(test): add common method to start server in background #3495

Merged
merged 1 commit into from May 5, 2020

Conversation

devoto13
Copy link
Collaborator

@devoto13 devoto13 commented May 5, 2020

The existing code had pretty confusing logic (old lines 33-36): when background server start fails it is actually considered a success, but child process is not started. Because of this lastRun contains result output of the karma start. This is no longer the case, hence two test cases had to be updated as they never executed karma run despite the statement and were asserting against karma start output. This should be more clear now.

As background server process now has its own variable to store output, there is no need for a dedicated runOut command and it can be removed.

@karmarunnerbot
Copy link
Member

Build karma 244 completed (commit ad25459fac by @devoto13)

@karmarunnerbot
Copy link
Member

Build karma 245 completed (commit 73d85e1b07 by @devoto13)

@karmarunnerbot
Copy link
Member

Build karma 245 completed (commit d9efd7d561 by @devoto13)

@devoto13 devoto13 requested a review from johnjbarton May 5, 2020 18:46
@karmarunnerbot
Copy link
Member

Build karma 246 completed (commit d9efd7d561 by @devoto13)

test/e2e/support/world.js Outdated Show resolved Hide resolved
test/e2e/support/world.js Outdated Show resolved Hide resolved
The existing code had pretty confusing logic (old lines 33-36)`: when background server start fails it is actually considered a success, but child process is not started. Because of this `lastRun` contains result output of the `karma start`. This is no longer the case, hence two test cases had to be updated as they never executed `karma run` despite the statement and were asserting against `karma start` output. This should be more clear now.

As background server process now has its own variable to store output, there is no need for a dedicated runOut command and it can be removed.
@karmarunnerbot
Copy link
Member

Build karma 247 completed (commit 341b694b46 by @devoto13)

@karmarunnerbot
Copy link
Member

Build karma 246 completed (commit 341b694b46 by @devoto13)

@johnjbarton johnjbarton merged commit a3d1f11 into karma-runner:master May 5, 2020
@devoto13 devoto13 deleted the background-server branch May 5, 2020 21:41
@karmarunnerbot
Copy link
Member

🎉 This PR is included in version 5.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

anthony-redFox pushed a commit to anthony-redFox/karma that referenced this pull request May 16, 2023
…a-runner#3495)

The existing code had pretty confusing logic (old lines 33-36)`: when background server start fails it is actually considered a success, but child process is not started. Because of this `lastRun` contains result output of the `karma start`. This is no longer the case, hence two test cases had to be updated as they never executed `karma run` despite the statement and were asserting against `karma start` output. This should be more clear now.

As background server process now has its own variable to store output, there is no need for a dedicated runOut command and it can be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants