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

Tests for Service Worker #1965

Merged
merged 23 commits into from
Nov 13, 2019
Merged

Tests for Service Worker #1965

merged 23 commits into from
Nov 13, 2019

Conversation

revanth0212
Copy link
Contributor

Description

Added tests for the Service Worker.

Related Issue

Closes #1789

Verification Steps

  1. Run yarn test and yarn test:ci. You should not see any errors.

Screenshots / Screen Captures (if appropriate)

image

Checklist

None

@revanth0212 revanth0212 added the version: Minor This changeset includes functionality added in a backwards compatible manner. label Nov 7, 2019
@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Nov 7, 2019

Messages
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).

Generated by 🚫 dangerJS against 85ee41d

Copy link
Contributor

@supernova-at supernova-at left a comment

Choose a reason for hiding this comment

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

Great mocking and great tests - thank you!

The biggest change request is restoring mocks when they're modified outside of a beforeAll or similar (that will restore for you).

@supernova-at
Copy link
Contributor

Changes look good. Deferring to @jimbo on our Unit Testing Best Practices™️ (see #1965 (comment)).

Copy link
Contributor

@supernova-at supernova-at left a comment

Choose a reason for hiding this comment

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

Approved. We can always refactor these tests later if we standardize on best practices.

@dpatil-magento dpatil-magento merged commit 0f91cd4 into develop Nov 13, 2019
@dpatil-magento dpatil-magento deleted the revanth/swTests branch November 13, 2019 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:venia-concept version: Minor This changeset includes functionality added in a backwards compatible manner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[misc]: Tests for sw.js
4 participants