@mentaproject/client 0.1.18 → 0.1.20

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.
@@ -34,16 +34,16 @@ describe('toJSON', () => {
34
34
  it('should convert bigints to strings', async () => {
35
35
  const obj = { a: 1n, b: { c: 2n } };
36
36
  const json = await toJSON({ obj });
37
- expect(json).toEqual({ a: '1', b: { c: '2' } });
37
+ expect(json).toEqual({ a: '1n', b: { c: '2n' } });
38
38
  });
39
39
 
40
40
  it('should handle nested class instances', async () => {
41
41
  const instance = new MockClass();
42
42
  const json = await toJSON({ obj: instance, depth: 1 });
43
43
  expect(json.a).toBe('a');
44
- expect(json.c).toBe('123');
44
+ expect(json.c).toBe('123n');
45
45
  expect(json.d).toEqual({ value: 'sub' });
46
- expect(json.e).toEqual({ f: '456' });
46
+ expect(json.e).toEqual({ f: '456n' });
47
47
  });
48
48
 
49
49
  it('should handle getters with depth > 0', async () => {
@@ -72,6 +72,6 @@ describe('toJSON', () => {
72
72
  it('should handle arrays with bigints', async () => {
73
73
  const obj = { data: [1n, 2n, { value: 3n }] };
74
74
  const json = await toJSON({ obj });
75
- expect(json).toEqual({ data: ['1', '2', { value: '3' }] });
75
+ expect(json).toEqual({ data: ['1n', '2n', { value: '3n' }] });
76
76
  });
77
77
  });