Skip to content

Commit c3b3257

Browse files
committed
fix: follow eslint rule
1 parent f9183b9 commit c3b3257

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/lib/audio/shared-audio-context.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import StartAudioContext from "startaudiocontext";
2-
import bowser from "bowser";
1+
import StartAudioContext from 'startaudiocontext';
2+
import bowser from 'bowser';
33

44
let AUDIO_CONTEXT;
55

@@ -8,9 +8,9 @@ if (!bowser.msie) {
88
* AudioContext can be initialized only when user interaction event happens
99
*/
1010
const event =
11-
typeof document.ontouchstart === "undefined"
12-
? "mousedown"
13-
: "touchstart";
11+
typeof document.ontouchstart === 'undefined' ?
12+
'mousedown' :
13+
'touchstart';
1414
const initAudioContext = () => {
1515
document.removeEventListener(event, initAudioContext);
1616
AUDIO_CONTEXT = new (window.AudioContext ||

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import "web-audio-test-api";
2-
import SharedAudioContext from "../../../src/lib/audio/shared-audio-context";
1+
import 'web-audio-test-api';
2+
import SharedAudioContext from '../../../src/lib/audio/shared-audio-context';
33

4-
describe("Shared Audio Context", () => {
4+
describe('Shared Audio Context', () => {
55
const audioContext = new AudioContext();
66

7-
test("returns empty object without user gesture", () => {
7+
test('returns empty object without user gesture', () => {
88
const sharedAudioContext = new SharedAudioContext();
99
expect(sharedAudioContext).toMatchObject({});
1010
});
1111

12-
test("returns AudioContext when mousedown is triggered", () => {
12+
test('returns AudioContext when mousedown is triggered', () => {
1313
const sharedAudioContext = new SharedAudioContext();
14-
const event = new Event("mousedown");
14+
const event = new Event('mousedown');
1515
document.dispatchEvent(event);
1616
expect(sharedAudioContext).toMatchObject(audioContext);
1717
});
1818

19-
test("returns AudioContext when touchstart is triggered", () => {
19+
test('returns AudioContext when touchstart is triggered', () => {
2020
const sharedAudioContext = new SharedAudioContext();
21-
const event = new Event("touchstart");
21+
const event = new Event('touchstart');
2222
document.dispatchEvent(event);
2323
expect(sharedAudioContext).toMatchObject(audioContext);
2424
});

0 commit comments

Comments
 (0)