Fix: 테스트 수정

This commit is contained in:
jhynsoo 2024-09-26 17:14:02 +09:00
parent 6cd0ee68c9
commit e069c6ff54

View File

@ -2,40 +2,40 @@ import createLabelJson from './createLabelJson';
describe('createLabelJson', () => {
it('should create a label JSON for classification', () => {
const result = createLabelJson('classification', 1080, 1920);
const result = createLabelJson('classification');
expect(result).toEqual({
version: '0.1.0',
task_type: 'cls',
shapes: [],
split: 'none',
imageHeight: 1080,
imageWidth: 1920,
imageHeight: 0,
imageWidth: 0,
imageDepth: 3,
});
});
it('should create a label JSON for detection', () => {
const result = createLabelJson('detection', 720, 1280);
const result = createLabelJson('detection');
expect(result).toEqual({
version: '0.1.0',
task_type: 'det',
shapes: [],
split: 'none',
imageHeight: 720,
imageWidth: 1280,
imageHeight: 0,
imageWidth: 0,
imageDepth: 3,
});
});
it('should create a label JSON for segmentation', () => {
const result = createLabelJson('segmentation', 480, 640);
const result = createLabelJson('segmentation');
expect(result).toEqual({
version: '0.1.0',
task_type: 'seg',
shapes: [],
split: 'none',
imageHeight: 480,
imageWidth: 640,
imageHeight: 0,
imageWidth: 0,
imageDepth: 3,
});
});