Skip to content

Commit a7c6152

Browse files
author
github-actions
committed
fast-follow - apply conflicts
1 parent 93d7a65 commit a7c6152

File tree

75 files changed

+15818
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+15818
-68
lines changed

WorkspaceStatic/jest/matchers/createConsoleMatcher.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
<<<<<<< HEAD
12
--!nonstrict
23
-- ROBLOX upstream: https://github.com/facebook/react/blob/6d50a9d090a2a672fc3dea5ce77a3a05332a6caa/fixtures/legacy-jsx-runtimes/setupTests.js
34
local Packages = script.Parent.Parent.Parent.TestRunner
45
local JestDiff = require(Packages.Dev.JestDiff)
56

7+
=======
8+
-- ROBLOX upstream: https://github.com/facebook/react/blob/v18.2.0/fixtures/legacy-jsx-runtimes/setupTests.js
9+
local Packages --[[ ROBLOX comment: must define Packages module ]]
10+
local LuauPolyfill = require(Packages.LuauPolyfill)
11+
local Array = LuauPolyfill.Array
12+
local Boolean = LuauPolyfill.Boolean
13+
local Error = LuauPolyfill.Error
14+
type Object = LuauPolyfill.Object
15+
local RegExp = require(Packages.RegExp)
16+
-- This is mostly copypasta from toWarnDev.js matchers
17+
-- that we use in the main repo Jest configuration.
18+
local expect = global.expect
19+
local jestDiff = require_("jest-diff").default
20+
local util = require_("util")
21+
>>>>>>> upstream-apply
622
local function shouldIgnoreConsoleError(format, args)
723
-- deviation: instead of checking if `process.env.NODE_ENV ~= "production"`
824
-- we use the __DEV__ global
@@ -32,6 +48,7 @@ local function shouldIgnoreConsoleError(format, args)
3248
-- // They are noisy too so we'll try to ignore them.
3349
return true
3450
end
51+
<<<<<<< HEAD
3552
if
3653
string.find(format, "act(...) is not supported in production builds of React")
3754
== 0
@@ -43,6 +60,9 @@ local function shouldIgnoreConsoleError(format, args)
4360
end
4461
end
4562

63+
=======
64+
end -- Looks legit
65+
>>>>>>> upstream-apply
4666
return false
4767
end
4868

WorkspaceStatic/jest/matchers/reactTestMatchers.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
<<<<<<< HEAD
12
-- ROBLOX upstream: https://github.com/facebook/react/blob/v17.0.2/scripts/jest/matchers/reactTestMatchers.js
23
local Packages = script.Parent.Parent.Parent.TestRunner
4+
=======
5+
-- ROBLOX upstream: https://github.com/facebook/react/blob/v18.2.0/scripts/jest/matchers/reactTestMatchers.js
6+
local Packages --[[ ROBLOX comment: must define Packages module ]]
7+
>>>>>>> upstream-apply
38
-- ROBLOX deviation START: fix import
49
-- local LuauPolyfill = require(Packages.LuauPolyfill)
510
local LuauPolyfill = require(Packages.Dev.LuauPolyfill)

WorkspaceStatic/jest/matchers/schedulerTestMatchers.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
<<<<<<< HEAD
12
-- ROBLOX upstream: https://github.com/facebook/react/blob/v17.0.2/scripts/jest/matchers/schedulerTestMatchers.js
23
local Packages = script.Parent.Parent.Parent.TestRunner
4+
=======
5+
-- ROBLOX upstream: https://github.com/facebook/react/blob/v18.2.0/scripts/jest/matchers/schedulerTestMatchers.js
6+
local Packages --[[ ROBLOX comment: must define Packages module ]]
7+
>>>>>>> upstream-apply
38
-- ROBLOX deviation START: fix import
49
-- local LuauPolyfill = require(Packages.LuauPolyfill)
510
local LuauPolyfill = require(Packages.Dev.LuauPolyfill)

modules/jest-react/src/JestReact.lua

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
-- ROBLOX upstream: https://github.com/facebook/react/blob/v17.0.2/packages/jest-react/src/JestReact.js
1+
-- ROBLOX upstream: https://github.com/facebook/react/blob/v18.2.0/packages/jest-react/src/JestReact.js
22
--[[*
33
* Copyright (c) Facebook, Inc. and its affiliates.
44
*
55
* This source code is licensed under the MIT license found in the
66
* LICENSE file in the root directory of this source tree.
77
]]
8+
<<<<<<< HEAD
89
local LuauPolyfill = require("@pkg/@jsdotlua/luau-polyfill")
910
local Array = LuauPolyfill.Array
11+
=======
12+
local Packages --[[ ROBLOX comment: must define Packages module ]]
13+
local LuauPolyfill = require(Packages.LuauPolyfill)
14+
>>>>>>> upstream-apply
1015
-- ROBLOX deviation START: not used
1116
-- local Boolean = LuauPolyfill.Boolean
1217
-- ROBLOX deviation END
18+
local Error = LuauPolyfill.Error
1319
local Object = LuauPolyfill.Object
1420
local exports = {}
1521
-- ROBLOX deviation START: fix import
@@ -23,13 +29,18 @@ local sharedReactSymbolsModule = require("@pkg/@jsdotlua/shared").ReactSymbols
2329
-- ROBLOX deviation END
2430
local REACT_ELEMENT_TYPE = sharedReactSymbolsModule.REACT_ELEMENT_TYPE
2531
local REACT_FRAGMENT_TYPE = sharedReactSymbolsModule.REACT_FRAGMENT_TYPE
32+
<<<<<<< HEAD
2633
-- ROBLOX deviation START: fix import
2734
-- local invariant = require("@pkg/@jsdotlua/shared").default
2835
local invariant = require("@pkg/@jsdotlua/shared").invariant
2936
-- ROBLOX deviation END
3037
-- ROBLOX deviation START: predeclare variables
3138
local jsonChildToJSXChild, jsonChildrenToJSXChildren
3239
-- ROBLOX deviation END
40+
=======
41+
local isArray = require(Packages.shared.isArray).default
42+
exports.act = require(script.Parent.internalAct).act
43+
>>>>>>> upstream-apply
3344
local function captureAssertion(fn)
3445
-- Trick to use a Jest matcher inside another Jest matcher. `fn` contains an
3546
-- assertion; if it throws, we capture the error and return it, so the stack
@@ -75,6 +86,7 @@ local function assertYieldsWereCleared(root)
7586
-- local actualYields = Scheduler:unstable_clearYields()
7687
local actualYields = Scheduler.unstable_clearYields()
7788
-- ROBLOX deviation END
89+
<<<<<<< HEAD
7890
invariant(
7991
-- ROBLOX deviation START: fix .length
8092
-- actualYields.length == 0,
@@ -83,6 +95,16 @@ local function assertYieldsWereCleared(root)
8395
"Log of yielded values is not empty. "
8496
.. "Call expect(ReactTestRenderer).unstable_toHaveYielded(...) first."
8597
)
98+
=======
99+
if actualYields.length ~= 0 then
100+
error(
101+
Error.new(
102+
"Log of yielded values is not empty. "
103+
.. "Call expect(ReactTestRenderer).unstable_toHaveYielded(...) first."
104+
)
105+
)
106+
end
107+
>>>>>>> upstream-apply
86108
end
87109
local function unstable_toMatchRenderedOutput(root, expectedJSX)
88110
assertYieldsWereCleared(root)
@@ -93,10 +115,14 @@ local function unstable_toMatchRenderedOutput(root, expectedJSX)
93115
local actualJSX
94116
if actualJSON == nil or typeof(actualJSON) == "string" then
95117
actualJSX = actualJSON
118+
<<<<<<< HEAD
96119
-- ROBLOX deviation START: remove toJSBoolean
97120
-- elseif Boolean.toJSBoolean(Array.isArray(actualJSON)) then
98121
elseif Array.isArray(actualJSON) then
99122
-- ROBLOX deviation END
123+
=======
124+
elseif Boolean.toJSBoolean(isArray(actualJSON)) then
125+
>>>>>>> upstream-apply
100126
-- ROBLOX deviation START: fix .length
101127
-- if actualJSON.length == 0 then
102128
if #actualJSON == 0 then

0 commit comments

Comments
 (0)