Skip to content

Commit 12b48b9

Browse files
committed
Removes tests for very simple utilities
1 parent 36d6934 commit 12b48b9

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed
Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
import { mod, getArrayLabel, toNumber, castArray } from './index';
1+
import { getArrayLabel } from './index';
22
import { SchemaField } from '@stac-manager/data-core';
33

4-
describe('mod', () => {
5-
it('should return the correct positive remainder', () => {
6-
expect(mod(5, 3)).toBe(2);
7-
});
8-
9-
it('should handle negative dividends correctly', () => {
10-
expect(mod(-1, 3)).toBe(2);
11-
});
12-
13-
it('should handle zero divisor correctly', () => {
14-
expect(mod(0, 3)).toBe(0);
15-
});
16-
});
17-
184
describe('getArrayLabel', () => {
195
it('should return a label with a number suffix for string labels', () => {
206
const field: SchemaField = { label: 'Label' } as any;
@@ -52,27 +38,3 @@ describe('getArrayLabel', () => {
5238
expect(result?.formatted).toMatchSnapshot();
5339
});
5440
});
55-
56-
describe('toNumber', () => {
57-
it('should convert valid numbers correctly', () => {
58-
expect(toNumber('42')).toBe(42);
59-
expect(toNumber(42)).toBe(42);
60-
});
61-
62-
it('should return null for invalid numbers', () => {
63-
expect(toNumber('abc')).toBeNull();
64-
expect(toNumber(undefined)).toBeNull();
65-
});
66-
});
67-
68-
describe('castArray', () => {
69-
it('should wrap non-array values in an array', () => {
70-
expect(castArray(42)).toEqual([42]);
71-
expect(castArray('test')).toEqual(['test']);
72-
});
73-
74-
it('should return the same array if input is already an array', () => {
75-
expect(castArray([42])).toEqual([42]);
76-
expect(castArray(['test'])).toEqual(['test']);
77-
});
78-
});

0 commit comments

Comments
 (0)