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
Contributor

@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 February 18, 2021 21:47
@jsjoeio jsjoeio changed the base branch from add-tests-emitter to add-tests-register February 18, 2021 21:47
ci/dev/lint.sh Show resolved Hide resolved
@jsjoeio jsjoeio force-pushed the add-tests-serviceWorker branch from 9a135e6 to 4d75321 Compare February 18, 2021 23:54
@jsjoeio jsjoeio marked this pull request as ready for review February 18, 2021 23:55
@jsjoeio jsjoeio requested review from oxy and code-asher February 18, 2021 23:55
Copy link

@oxy oxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

jsjoeio commented Feb 24, 2021

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

image

@jsjoeio jsjoeio requested a review from a team February 24, 2021 23:25
@jsjoeio jsjoeio merged commit 54ea107 into add-tests-register Feb 25, 2021
@jsjoeio jsjoeio deleted the add-tests-serviceWorker branch February 25, 2021 16:52
@jsjoeio jsjoeio added the testing Anything related to testing label May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Anything related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants