Skip to content

Commit acc76bd

Browse files
committed
run new tests through prettier
1 parent 79bd843 commit acc76bd

File tree

4 files changed

+216
-229
lines changed

4 files changed

+216
-229
lines changed

src/errors.test.js

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,56 @@
11
// Public package exports
2-
import {
3-
InvalidRSAA,
4-
InternalError,
5-
RequestError,
6-
ApiError
7-
} from './index.js';
2+
import { InvalidRSAA, InternalError, RequestError, ApiError } from './index.js';
83

94
describe('InvalidRSAA', () => {
105
const validationErrors = ['validation error 1', 'validation error 2'];
116
const error = new InvalidRSAA(validationErrors);
127

138
it('is an error object', () => {
14-
expect(error).toBeInstanceOf(Error)
15-
})
9+
expect(error).toBeInstanceOf(Error);
10+
});
1611

1712
it('matches snapshot', () => {
18-
expect(error).toMatchSnapshot()
19-
expect(Object.entries(error)).toMatchSnapshot('object.entries')
20-
})
21-
})
13+
expect(error).toMatchSnapshot();
14+
expect(Object.entries(error)).toMatchSnapshot('object.entries');
15+
});
16+
});
2217

2318
describe('InternalError', () => {
2419
const error = new InternalError('error thrown in payload function');
2520

2621
it('is an error object', () => {
27-
expect(error).toBeInstanceOf(Error)
28-
})
22+
expect(error).toBeInstanceOf(Error);
23+
});
2924

3025
it('matches snapshot', () => {
31-
expect(error).toMatchSnapshot()
32-
expect(Object.entries(error)).toMatchSnapshot('object.entries')
33-
})
34-
})
26+
expect(error).toMatchSnapshot();
27+
expect(Object.entries(error)).toMatchSnapshot('object.entries');
28+
});
29+
});
3530

3631
describe('RequestError', () => {
3732
const error = new RequestError('Network request failed');
3833

3934
it('is an error object', () => {
40-
expect(error).toBeInstanceOf(Error)
41-
})
35+
expect(error).toBeInstanceOf(Error);
36+
});
4237

4338
it('matches snapshot', () => {
44-
expect(error).toMatchSnapshot()
45-
expect(Object.entries(error)).toMatchSnapshot('object.entries')
46-
})
47-
})
39+
expect(error).toMatchSnapshot();
40+
expect(Object.entries(error)).toMatchSnapshot('object.entries');
41+
});
42+
});
4843

4944
describe('ApiError', () => {
5045
const json = { error: 'Resource not found' };
5146
const error = new ApiError(404, 'Not Found', json);
5247

5348
it('is an error object', () => {
54-
expect(error).toBeInstanceOf(Error)
55-
})
49+
expect(error).toBeInstanceOf(Error);
50+
});
5651

5752
it('matches snapshot', () => {
58-
expect(error).toMatchSnapshot()
59-
expect(Object.entries(error)).toMatchSnapshot('object.entries')
60-
})
61-
})
53+
expect(error).toMatchSnapshot();
54+
expect(Object.entries(error)).toMatchSnapshot('object.entries');
55+
});
56+
});

0 commit comments

Comments
 (0)