Skip to content

Commit 38f2aca

Browse files
committed
tests: 100%
1 parent b8e1d6c commit 38f2aca

File tree

4 files changed

+71
-13
lines changed

4 files changed

+71
-13
lines changed

packages/core/__tests__/features/adapter/adapter.base.spec.ts

+9
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ describe("Adapter [ Base ]", () => {
157157
expect(callback).toHaveBeenCalledWith({});
158158
expect(result).toBe(defaults);
159159
});
160+
161+
it("should set internal error mapping callback", () => {
162+
const errorMapping = (error: any) => ({ customError: error });
163+
const callback = jest.fn().mockImplementation(errorMapping);
164+
165+
adapter.setInternalErrorMapping(callback);
166+
167+
expect(adapter.unsafe_internalErrorMapping).toBe(callback);
168+
});
160169
});
161170

162171
describe("when checking default mappers", () => {

0 commit comments

Comments
 (0)