17 lines
448 B
TypeScript

const originalModule = jest.requireActual("@/app/lib/settings");
class MockSettings {
public constructor(public db = {}) {}
public setHostLanguage = jest.fn((val: string) => {});
public setLibretranslateBaseUrl(val: string) {}
getHostLanguage = jest.fn(() => {
return "en";
});
getLibretranslateBaseUrl = jest.fn(() => {
return "http://localhost:5004";
});
}
export default {
...originalModule,
Settings: MockSettings,
};