Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
bcc469a2
Commit
bcc469a2
authored
Dec 05, 2023
by
pythongosssss
Browse files
try to stop test failing
parent
a99da666
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests-ui/tests/extensions.test.js
tests-ui/tests/extensions.test.js
+2
-2
No files found.
tests-ui/tests/extensions.test.js
View file @
bcc469a2
...
@@ -52,7 +52,7 @@ describe("extensions", () => {
...
@@ -52,7 +52,7 @@ describe("extensions", () => {
const
nodeNames
=
Object
.
keys
(
defs
);
const
nodeNames
=
Object
.
keys
(
defs
);
const
nodeCount
=
nodeNames
.
length
;
const
nodeCount
=
nodeNames
.
length
;
expect
(
mockExtension
.
beforeRegisterNodeDef
).
toHaveBeenCalledTimes
(
nodeCount
);
expect
(
mockExtension
.
beforeRegisterNodeDef
).
toHaveBeenCalledTimes
(
nodeCount
);
for
(
let
i
=
0
;
i
<
nodeCount
;
i
++
)
{
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
// It should be send the JS class and the original JSON definition
// It should be send the JS class and the original JSON definition
const
nodeClass
=
mockExtension
.
beforeRegisterNodeDef
.
mock
.
calls
[
i
][
0
];
const
nodeClass
=
mockExtension
.
beforeRegisterNodeDef
.
mock
.
calls
[
i
][
0
];
const
nodeDef
=
mockExtension
.
beforeRegisterNodeDef
.
mock
.
calls
[
i
][
1
];
const
nodeDef
=
mockExtension
.
beforeRegisterNodeDef
.
mock
.
calls
[
i
][
1
];
...
@@ -133,7 +133,7 @@ describe("extensions", () => {
...
@@ -133,7 +133,7 @@ describe("extensions", () => {
expect
(
mockExtension
.
nodeCreated
).
toHaveBeenCalledTimes
(
graphData
.
nodes
.
length
+
2
);
expect
(
mockExtension
.
nodeCreated
).
toHaveBeenCalledTimes
(
graphData
.
nodes
.
length
+
2
);
expect
(
mockExtension
.
loadedGraphNode
).
toHaveBeenCalledTimes
(
graphData
.
nodes
.
length
+
1
);
expect
(
mockExtension
.
loadedGraphNode
).
toHaveBeenCalledTimes
(
graphData
.
nodes
.
length
+
1
);
expect
(
mockExtension
.
afterConfigureGraph
).
toHaveBeenCalledTimes
(
2
);
expect
(
mockExtension
.
afterConfigureGraph
).
toHaveBeenCalledTimes
(
2
);
});
}
,
15000
);
it
(
"
allows custom nodeDefs and widgets to be registered
"
,
async
()
=>
{
it
(
"
allows custom nodeDefs and widgets to be registered
"
,
async
()
=>
{
const
widgetMock
=
jest
.
fn
((
node
,
inputName
,
inputData
,
app
)
=>
{
const
widgetMock
=
jest
.
fn
((
node
,
inputName
,
inputData
,
app
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment