This file contains hidden or 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
| import {shallow} from 'enzyme'; | |
| // '@types/jasmine-enzyme/index.d.ts' is not a module. | |
| import jasmineEnzyme from 'jasmine-enzyme'; | |
| import * as React from 'react'; | |
| const MyComponent = () => ( | |
| <div>Foo</div> | |
| ); | |
| describe('myComponent', () => { |
This file contains hidden or 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
| class Demo extends LayoutTransitionGroup { | |
| state = { | |
| config: 0, | |
| }; | |
| config = (i) => { | |
| return () => { | |
| // this is where the magic happens ✨ | |
| this.beginTransition((prevState) => ({ | |
| config: i, |
This file contains hidden or 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
| /* | |
| Credit to: | |
| https://github.com/GoogleChrome/sw-toolbox/blob/master/lib/idb-cache-expiration.js | |
| for ideas and initial code | |
| */ | |
| 'use strict'; | |
| const DB_PREFIX = 'demo-cache-'; | |
| const DB_VERSION = 1; | |
| const STORE_NAME = 'store'; |