Skip to content

Commit

Permalink
Update Es6ClassMocks.md (#5402)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavinchen92 authored and SimenB committed Jan 27, 2018
1 parent 922b037 commit 0816692
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/Es6ClassMocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Import the mock and the mock method shared by all instances:
```javascript
// sound-player-consumer.test.js
import SoundPlayer, { mockPlaySoundFile } from './sound-player';
import SoundPlayerConsumer from './sound-player-consumer';
jest.mock('./sound-player'); // SoundPlayer is now a mock constructor

beforeEach(() => {
Expand Down

0 comments on commit 0816692

Please sign in to comment.