Skip to content

Commit c5e214e

Browse files
committed
test: set react flags in spec files only
1 parent 0c36178 commit c5e214e

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/init.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_G.__ROACT_17_MOCK_SCHEDULER__ = true;
2+
3+
export = () => {
4+
afterAll(() => {
5+
_G.__ROACT_17_MOCK_SCHEDULER__ = undefined;
6+
});
7+
};

src/react-env.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
interface _G {
2-
__DEV__: boolean;
3-
__ROACT_17_MOCK_SCHEDULER__: boolean;
2+
__DEV__?: boolean;
3+
__ROACT_17_MOCK_SCHEDULER__?: boolean;
44
}

src/utils/testez.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
_G.__ROACT_17_MOCK_SCHEDULER__ = true;
2-
31
import React, { useRef } from "@rbxts/react";
42
import { act, createLegacyRoot } from "@rbxts/react-roblox";
53

0 commit comments

Comments
 (0)