Skip to content

Commit

Permalink
test: update mimetype and data tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OrbisK committed Nov 26, 2024
1 parent f3c1d64 commit 2c585aa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ describe('useMediaRecorder', () => {
expect(state.value).toMatchInlineSnapshot(`"inactive"`)
})

it.skip('data should update when recording', async () => {
it('data should update when recording', async () => {
const {
start,
data,
} = useMediaRecorder({ constraints: { audio: true } })
data.value = []
expect(data.value?.length).toBe(0)
await start()
await new Promise(resolve => setTimeout(resolve, 1000))
await start(10)
await new Promise(resolve => setTimeout(resolve, 100))
console.log(data.value)
expect(data.value?.length).toBeGreaterThan(0)
})
Expand Down Expand Up @@ -85,14 +85,14 @@ describe('useMediaRecorder', () => {
expect(stream.value).toBeDefined()
})

it.skip('mime type should be defined after recording', async () => {
it('mime type should be defined after recording', async () => {
const {
start,
mimeType
} = useMediaRecorder({ constraints: { audio: true } })
expect(mimeType.value).toBeUndefined()
await start()
await new Promise(resolve => setTimeout(resolve, 1000))
await start(10)
await new Promise(resolve => setTimeout(resolve, 200))
expect(mimeType.value).toBeDefined()
})

Expand Down

0 comments on commit 2c585aa

Please sign in to comment.