Skip to content

Commit 87b86b6

Browse files
committed
test: let web-audio-test-api resume
Without this change, `web-audio-test-api` can throw like this: ``` TypeError: Failed to execute the 'transitionToState' on 'AudioContext' not enabled ```
1 parent 05a2d16 commit 87b86b6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/unit/util/audio-context.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
/* global WebAudioTestAPI */
12
import 'web-audio-test-api';
3+
WebAudioTestAPI.setState({
4+
'AudioContext#resume': 'enabled'
5+
});
6+
27
import SharedAudioContext from '../../../src/lib/audio/shared-audio-context';
38

49
describe('Shared Audio Context', () => {

test/unit/util/vm-manager-hoc.test.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
/* global WebAudioTestAPI */
12
import 'web-audio-test-api';
3+
WebAudioTestAPI.setState({
4+
'AudioContext#resume': 'enabled'
5+
});
26

37
import React from 'react';
48
import configureStore from 'redux-mock-store';

0 commit comments

Comments
 (0)