Skip to content

Commit 0be5370

Browse files
committed
ci(jest): parallelize tests
1 parent 91c84a2 commit 0be5370

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

HACKS.md

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ This is an old restriction for an old hermes version. It's messing with our xcod
5656

5757
When this is merged: https://github.com/facebook/react-native/pull/30345.
5858

59+
## react-native patch-package (b/node_modules/react-native/jest/assetFileTransformer.js)
60+
61+
#### When can we remove this:
62+
63+
When we upgrade to RN 0.69. See: https://github.com/facebook/react-native/pull/33756
64+
5965
#### Explanation/Context:
6066

6167
For some reason CircleCI kept giving an error when running tests `TypeError: stacktraceParser.parse is not a function`. Once I moved the require higher up, things started working again.

jest.config.js

-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ module.exports = {
1616
testEnvironmentOptions: {
1717
url: "http://localhost/",
1818
},
19-
fakeTimers: {
20-
enableGlobally: false,
21-
// legacyFakeTimers: true,
22-
},
2319
transform: {
2420
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$":
2521
"<rootDir>/node_modules/react-native/jest/assetFileTransformer.js",

src/app/Components/Bidding/Screens/ConfirmBid.tests.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jest.mock("tipsi-stripe", () => ({
5353

5454
let nextStep: NavigatorIOSPushArgs | null
5555
const mockNavigator: Partial<NavigatorIOS> = { push: (route) => (nextStep = route) }
56+
57+
// FIME: JEST_UPGRADE_29
5658
// jest.useFakeTimers({
5759
// legacyFakeTimers: true,
5860
// })
@@ -652,6 +654,7 @@ describe("ConfirmBid for unqualified user", () => {
652654
throw new Error("Error tokenizing card")
653655
})
654656

657+
// FIME: JEST_UPGRADE_29
655658
// jest.useFakeTimers({
656659
// legacyFakeTimers: true,
657660
// })

src/app/Components/Bidding/Screens/Registration.tests.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jest.mock("tipsi-stripe", () => ({
3434

3535
let nextStep: any
3636
const mockNavigator = { push: (route: any) => (nextStep = route), pop: () => null }
37+
// FIME: JEST_UPGRADE_29
3738
// jest.useFakeTimers()
3839
const mockPostNotificationName = LegacyNativeModules.ARNotificationsManager.postNotificationName
3940

src/app/Components/Toast/Toast.tests.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const TestRenderer: React.FC<{ toastOptions?: ToastOptions }> = ({ toastOptions
2121
describe("Toast", () => {
2222
beforeEach(() => {
2323
jest.clearAllMocks()
24+
// FIME: JEST_UPGRADE_29
2425
// jest.useFakeTimers({
2526
// legacyFakeTimers: true,
2627
// })

0 commit comments

Comments
 (0)