start mock of file bytes.
This commit is contained in:
parent
75b76efd33
commit
61e54ded3c
@ -8,6 +8,23 @@ import { Knex } from "knex";
|
||||
|
||||
const RENDER_TIME = 1000;
|
||||
|
||||
jest.mock('@/app/lib/whisper', () => {
|
||||
const originalModule = jest.requireActual('@/app/lib/whisper');
|
||||
|
||||
return {
|
||||
...originalModule,
|
||||
Whisper: class {
|
||||
constructor(...args) {
|
||||
originalModule.Whisper.apply(this, args);
|
||||
}
|
||||
|
||||
targetFile = {
|
||||
bytes: jest.fn().mockReturnValue(new Uint8Array([/* mock data */])),
|
||||
};
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock("@/app/i18n/api", () => {
|
||||
class LanguageServer {
|
||||
fetchLanguages = () => {
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user