@remoteoss/json-schema-form 0.11.11-dev.20250220174843 → 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +0,0 @@
1
- export function mockConsole() {
2
- jest.spyOn(console, 'warn').mockImplementation(() => {});
3
- jest.spyOn(console, 'error').mockImplementation(() => {});
4
- }
5
-
6
- export function restoreConsoleAndEnsureItWasNotCalled() {
7
- expect(console.error).not.toHaveBeenCalled();
8
- console.error.mockRestore();
9
- expect(console.warn).not.toHaveBeenCalled();
10
- console.warn.mockRestore();
11
- }
@@ -1,32 +0,0 @@
1
- import { convertDiskSizeFromTo } from '@/utils';
2
-
3
- describe('convertDiskSizeFromTo()', () => {
4
- it('should convert bytes to KB', () => {
5
- const convert = convertDiskSizeFromTo('Bytes', 'KB');
6
- expect(convert(1024)).toBe(1);
7
- });
8
- it('should convert bytes to MB', () => {
9
- const convert = convertDiskSizeFromTo('Bytes', 'MB');
10
- expect(convert(1024 * 1024)).toBe(1);
11
- });
12
-
13
- it('should convert KB to MB', () => {
14
- const convert = convertDiskSizeFromTo('KB', 'MB');
15
- expect(convert(1024)).toBe(1);
16
- });
17
-
18
- it('should convert KB to Bytes', () => {
19
- const convert = convertDiskSizeFromTo('KB', 'Bytes');
20
- expect(convert(1)).toBe(1024);
21
- });
22
-
23
- it('should convert MB to KB', () => {
24
- const convert = convertDiskSizeFromTo('MB', 'KB');
25
- expect(convert(1)).toBe(1024);
26
- });
27
-
28
- it('should convert MB to KB', () => {
29
- const convert = convertDiskSizeFromTo('MB', 'Bytes');
30
- expect(convert(1)).toBe(1048576);
31
- });
32
- });