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

feat(testing): add tests for serviceWorker.ts #2744

Merged
merged 10 commits into from Feb 25, 2021

Conversation

@jsjoeio
Copy link
Collaborator

@jsjoeio jsjoeio commented Feb 18, 2021

This PR adds a few tests for src/browser/serviceWorker.ts.

Screenshot

image

It increases our code coverage (Lines) from 51.31% to 51.74% (↑ 0.43%).
🟩 100% Line coverage (last 100) for src/browser/serviceWorker.ts

image

This also completes Lines coverage for src/browser πŸŽ‰
image

TODOS

  • investigate unhandled promise rejections
  • figure out how to write a patch for a node_module
  • rebase
  • fix inconsistency
  • try mocking ourselves
@jsjoeio jsjoeio added this to the v3.9.1 milestone Feb 18, 2021
@jsjoeio jsjoeio self-assigned this Feb 18, 2021
@jsjoeio jsjoeio changed the base branch from master to add-tests-emitter Feb 18, 2021
@jsjoeio jsjoeio changed the base branch from add-tests-emitter to add-tests-register Feb 18, 2021
ci/dev/lint.sh Show resolved Hide resolved
Loading
@jsjoeio jsjoeio force-pushed the add-tests-serviceWorker branch from 9a135e6 to 4d75321 Feb 18, 2021
@jsjoeio jsjoeio marked this pull request as ready for review Feb 18, 2021
@jsjoeio jsjoeio requested review from oxy and code-asher Feb 18, 2021
oxy
oxy approved these changes Feb 22, 2021
Copy link
Contributor

@oxy oxy left a comment

LGTM! Your call on the ; in one of the patches we apply; I think internal consistency with the patched file may be the best.

Loading

test/patches/service-worker-mock-response.patch Outdated Show resolved Hide resolved
Loading
@jsjoeio jsjoeio marked this pull request as draft Feb 22, 2021
test/package.json Outdated Show resolved Hide resolved
Loading
@jsjoeio jsjoeio force-pushed the add-tests-register branch 3 times, most recently from 14ad29a to 909d425 Feb 23, 2021
@jsjoeio jsjoeio force-pushed the add-tests-serviceWorker branch from 4d75321 to 040c0d6 Feb 24, 2021
@jsjoeio jsjoeio marked this pull request as ready for review Feb 24, 2021
@jsjoeio jsjoeio force-pushed the add-tests-serviceWorker branch from 5b4711c to f1f0f49 Feb 24, 2021
@jsjoeio jsjoeio requested a review from code-asher Feb 24, 2021
@jsjoeio
Copy link
Collaborator Author

@jsjoeio jsjoeio commented Feb 24, 2021

EDIT: this time it was a network timeout. Running again.

image

Loading

@jsjoeio jsjoeio requested a review from Feb 24, 2021
@jsjoeio jsjoeio merged commit 54ea107 into add-tests-register Feb 25, 2021
9 checks passed
Loading
@jsjoeio jsjoeio deleted the add-tests-serviceWorker branch Feb 25, 2021
@jsjoeio jsjoeio added this to 🚧 In progress in Improve Testing via automation Feb 25, 2021
@jsjoeio jsjoeio moved this from 🚧 In progress to βœ… Done in Improve Testing Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants