We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fd512a commit 2083883Copy full SHA for 2083883
packages/core/test/tracing/integrations/appStart.test.ts
@@ -63,6 +63,24 @@ jest.mock('@sentry/utils', () => {
63
};
64
});
65
66
+// Overrides expect.closeTo to increase tolerance from 0.005 (2 decimal digits) to 0.025
67
+expect.extend({
68
+ closeTo(received, expected, tolerance = 0.025) {
69
+ const pass = Math.abs(expected - received) < tolerance;
70
+ if (pass) {
71
+ return {
72
+ message: () => `expected ${received} not to be close to ${expected} within ${tolerance}`,
73
+ pass: true,
74
+ };
75
+ } else {
76
77
+ message: () => `expected ${received} to be close to ${expected} within ${tolerance}`,
78
+ pass: false,
79
80
+ }
81
+ },
82
+});
83
+
84
describe('App Start Integration', () => {
85
beforeEach(() => {
86
mockReactNativeBundleExecutionStartTimestamp();
0 commit comments