update mino=io coverage
Backend SonarQube Check testing / sonar-check (push) Has been cancelled Details

This commit is contained in:
Syifa 2026-01-09 10:04:34 +07:00
parent c3948ab77e
commit bd843a5aa0
2 changed files with 19 additions and 1 deletions

8
__mocks__/minio.js Normal file
View File

@ -0,0 +1,8 @@
module.exports = {
Client: jest.fn().mockImplementation(() => ({
bucketExists: jest.fn(),
makeBucket: jest.fn(),
putObject: jest.fn(),
getObject: jest.fn(),
})),
};

View File

@ -1,4 +1,14 @@
// MOCK FILE ESM BIAR JEST GA PARSE
jest.mock('../app/static/prefix.js', () => ({
default: {},
}));
// MOCK MINIO BIAR GA CONNECT
jest.mock('minio', () => ({
Client: jest.fn(() => ({})),
}));
test('load backend', () => {
require('../index'); // ⬅️ INI WAJIB
require('../index');
expect(true).toBe(true);
});