Skip to content

Commit a2a21a5

Browse files
authored
test: fix ts types (#4106)
1 parent 0075aa8 commit a2a21a5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/__tests__/event-emitter.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import EventEmitter from '../event-emitter.js'
33
interface Events {
44
foo: [number]
55
bar: []
6+
[key: string]: unknown[]
67
}
78

89
describe('EventEmitter', () => {

src/__tests__/player.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Player from '../player.js'
22

3-
interface Events {}
3+
interface Events {
4+
[key: string]: unknown[]
5+
}
46

57
describe('Player', () => {
68
const createMedia = () => {
@@ -35,7 +37,7 @@ describe('Player', () => {
3537

3638
test('setTime clamps to duration', () => {
3739
const media = createMedia()
38-
media.duration = 10
40+
Object.defineProperty(media, 'duration', { configurable: true, value: 10 })
3941
const player = new Player<Events>({ media })
4042
player.setTime(-1)
4143
expect(player.getCurrentTime()).toBe(0)

0 commit comments

Comments
 (0)