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 1b493aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 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,8 +31,12 @@ 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;

afterEach(() => deregister(port));

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

await register(port);
});
Expand Down

0 comments on commit 1b493aa

Please sign in to comment.