This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const makeServiceWorkerEnv = require('service-worker-mock'); | |
describe('Service worker', () => { | |
beforeEach(() => { | |
Object.assign(global, makeServiceWorkerEnv()); | |
jest.resetModules(); | |
}); | |
// ... | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PRECACHE = 'precache-v1'; | |
const RUNTIME = 'runtime'; | |
// A list of local resources we always want to be cached. | |
const PRECACHE_URLS = [ | |
'index.html', | |
'./', // Alias for index.html | |
'styles.css', | |
'../../styles/main.css', | |
'demo.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require('react'); | |
const PropTypes = React.PropTypes; | |
const { connect } = require('react-redux'); | |
const Modal = require('react-modal'); | |
const { closeModal } = require('actions/modal'); | |
const MODAL_STYLE = { | |
content: { |
NewerOlder