Skip to content

Commit

Permalink
test: test deregister()
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelv-kry authored and chrisguttandin committed Apr 26, 2024
1 parent 1edd592 commit 2db412e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/integration/module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AudioContext, ConstantSourceNode } from 'standardized-audio-context';
import { MediaRecorder, isSupported, register } from '../../src/module';
import { MediaRecorder, deregister, isSupported, register } from '../../src/module';
import { connect } from 'extendable-media-recorder-wav-encoder';
import { createMediaStreamAudioDestinationNode } from '../helpers/create-media-stream-audio-destination-node';
import { createMediaStreamWithAudioTrack } from '../helpers/create-media-stream-with-audio-track';
Expand Down Expand Up @@ -31,12 +31,18 @@ describe('module', () => {
// eslint-disable-next-line no-undef
if (!process.env.TARGET || !process.env.TARGET.endsWith('-unsupported')) {
describe('MediaRecorder', () => {
before(async () => {
const port = await connect();
let port;

beforeEach(async () => {
port = await connect();

await register(port);
});

afterEach(async () => {
await deregister(port);
});

// eslint-disable-next-line no-undef
const channelCounts = process.env.CI && /Chrome/.test(navigator.userAgent) ? [2] : [1, 2];
const mimeTypes = [
Expand Down

0 comments on commit 2db412e

Please sign in to comment.