Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
luongngocminh committed Nov 28, 2023
1 parent 8b28766 commit 42072f0
Show file tree
Hide file tree
Showing 84 changed files with 4,431 additions and 1,386 deletions.
512 changes: 349 additions & 163 deletions dist/index.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.cjs.map

Large diffs are not rendered by default.

512 changes: 350 additions & 162 deletions dist/index.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.esm.js.map

Large diffs are not rendered by default.

512 changes: 349 additions & 163 deletions dist/index.iife.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.iife.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.iife.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.iife.min.js.map

Large diffs are not rendered by default.

512 changes: 349 additions & 163 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

512 changes: 350 additions & 162 deletions dist/index.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.mjs.map

Large diffs are not rendered by default.

512 changes: 349 additions & 163 deletions dist/index.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.umd.min.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
* @type {import('ts-jest').JestConfigWithTsJest}
*/
const options = {
testEnvironment: 'jsdom',
transform: {
'^.+\\.tsx?$': [
'^.+\\.ts?$': [
'ts-jest',
{
isolatedModules: true,
useESM: true
useESM: true,
},
],
},
resolver: 'ts-jest-resolver'
resolver: 'ts-jest-resolver',
setupFiles: ['./jest.setup.ts'],
};

module.exports = options;
16 changes: 16 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { TextEncoder, TextDecoder } from 'util';

Object.assign(global, { TextDecoder, TextEncoder });

Object.defineProperty(window, 'MediaStream', {
writable: true,
value: jest.fn().mockImplementation(() => ({
addTrack: jest.fn(),
getTracks: jest.fn().mockImplementation(() => []),
})),
});

Object.defineProperty(window, 'MediaStreamTrack', {
writable: true,
value: jest.fn().mockImplementation(() => ({})),
});
Loading

0 comments on commit 42072f0

Please sign in to comment.