Skip to content

Commit 0ce5aeb

Browse files
committed
eslint disable next litegraph tests
1 parent a289f44 commit 0ce5aeb

File tree

8 files changed

+22
-3
lines changed

8 files changed

+22
-3
lines changed

src/lib/litegraph/test/LGraphNode.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('LGraphNode', () => {
3232

3333
beforeEach(() => {
3434
origLiteGraph = Object.assign({}, LiteGraph)
35-
// @ts-expect-error
35+
// @ts-expect-error TODO: Fix after merge - Classes property not in type
3636
delete origLiteGraph.Classes
3737

3838
Object.assign(LiteGraph, {

src/lib/litegraph/test/LinkConnector.integration.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const test = baseTest.extend<TestContext>({
4141
await use(reroutesComplexGraph)
4242
},
4343
setConnectingLinks: async (
44+
// eslint-disable-next-line no-empty-pattern
4445
{},
4546
use: (mock: ReturnType<typeof vi.fn>) => Promise<void>
4647
) => {

src/lib/litegraph/test/LinkConnector.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ interface TestContext {
2828
}
2929

3030
const test = baseTest.extend<TestContext>({
31+
// eslint-disable-next-line no-empty-pattern
3132
network: async ({}, use) => {
3233
const graph = new LGraph()
3334
const floatingLinks = new Map<number, LLink>()
@@ -52,6 +53,7 @@ const test = baseTest.extend<TestContext>({
5253
},
5354

5455
setConnectingLinks: async (
56+
// eslint-disable-next-line no-empty-pattern
5557
{},
5658
use: (mock: ReturnType<typeof vi.fn>) => Promise<void>
5759
) => {

src/lib/litegraph/test/infrastructure/Rectangle.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { Point, Size } from '@/lib/litegraph/src/interfaces'
66
// TODO: If there's a common test context, use it here
77
// For now, we'll define a simple context for Rectangle tests
88
const test = baseTest.extend<{ rect: Rectangle }>({
9+
// eslint-disable-next-line no-empty-pattern
910
rect: async ({}, use) => {
1011
await use(new Rectangle())
1112
}

src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ describe('ExecutableNodeDTO Memory Efficiency', () => {
300300
expect(dto.inputs).toHaveLength(2) // Copied input data only
301301

302302
// Should not duplicate heavy node data
303+
// eslint-disable-next-line no-prototype-builtins
303304
expect(dto.hasOwnProperty('outputs')).toBe(false) // Outputs not copied
305+
// eslint-disable-next-line no-prototype-builtins
304306
expect(dto.hasOwnProperty('widgets')).toBe(false) // Widgets not copied
305307
})
306308

@@ -340,7 +342,9 @@ describe('ExecutableNodeDTO Memory Efficiency', () => {
340342
expect(dto.graph).toBe(innerNode.graph)
341343

342344
// Should not hold heavy references that prevent GC
345+
// eslint-disable-next-line no-prototype-builtins
343346
expect(dto.hasOwnProperty('parentGraph')).toBe(false)
347+
// eslint-disable-next-line no-prototype-builtins
344348
expect(dto.hasOwnProperty('rootGraph')).toBe(false)
345349
})
346350
})

src/lib/litegraph/test/subgraph/SubgraphSlotConnections.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ describe('Subgraph slot connections', () => {
229229
expect(isSubgraphInput(subgraphInput)).toBe(true)
230230
expect(isSubgraphInput(node.inputs[0])).toBe(false)
231231
expect(isSubgraphInput(null)).toBe(false)
232-
// eslint-disable-next-line unicorn/no-useless-undefined
233232
expect(isSubgraphInput(undefined)).toBe(false)
234233
expect(isSubgraphInput({})).toBe(false)
235234
})
@@ -243,7 +242,6 @@ describe('Subgraph slot connections', () => {
243242
expect(isSubgraphOutput(subgraphOutput)).toBe(true)
244243
expect(isSubgraphOutput(node.outputs[0])).toBe(false)
245244
expect(isSubgraphOutput(null)).toBe(false)
246-
// eslint-disable-next-line unicorn/no-useless-undefined
247245
expect(isSubgraphOutput(undefined)).toBe(false)
248246
expect(isSubgraphOutput({})).toBe(false)
249247
})

src/lib/litegraph/test/subgraph/fixtures/subgraphFixtures.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface SubgraphFixtures {
5858
*/
5959
export const subgraphTest = test.extend<SubgraphFixtures>({
6060
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
61+
// eslint-disable-next-line no-empty-pattern
6162
emptySubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
6263
const subgraph = createTestSubgraph({
6364
name: 'Empty Test Subgraph',
@@ -70,6 +71,7 @@ export const subgraphTest = test.extend<SubgraphFixtures>({
7071
},
7172

7273
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
74+
// eslint-disable-next-line no-empty-pattern
7375
simpleSubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
7476
const subgraph = createTestSubgraph({
7577
name: 'Simple Test Subgraph',
@@ -82,6 +84,7 @@ export const subgraphTest = test.extend<SubgraphFixtures>({
8284
},
8385

8486
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
87+
// eslint-disable-next-line no-empty-pattern
8588
complexSubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
8689
const subgraph = createTestSubgraph({
8790
name: 'Complex Test Subgraph',
@@ -101,6 +104,7 @@ export const subgraphTest = test.extend<SubgraphFixtures>({
101104
},
102105

103106
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
107+
// eslint-disable-next-line no-empty-pattern
104108
nestedSubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
105109
const nested = createNestedSubgraphs({
106110
depth: 3,
@@ -113,6 +117,7 @@ export const subgraphTest = test.extend<SubgraphFixtures>({
113117
},
114118

115119
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
120+
// eslint-disable-next-line no-empty-pattern
116121
subgraphWithNode: async ({}, use: (value: unknown) => Promise<void>) => {
117122
// Create the subgraph definition
118123
const subgraph = createTestSubgraph({
@@ -140,6 +145,7 @@ export const subgraphTest = test.extend<SubgraphFixtures>({
140145
},
141146

142147
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
148+
// eslint-disable-next-line no-empty-pattern
143149
eventCapture: async ({}, use: (value: unknown) => Promise<void>) => {
144150
const subgraph = createTestSubgraph({
145151
name: 'Event Test Subgraph'
@@ -191,6 +197,7 @@ export interface EdgeCaseFixtures {
191197
*/
192198
export const edgeCaseTest = subgraphTest.extend<EdgeCaseFixtures>({
193199
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
200+
// eslint-disable-next-line no-empty-pattern
194201
circularSubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
195202
const rootGraph = new LGraph()
196203

@@ -225,6 +232,7 @@ export const edgeCaseTest = subgraphTest.extend<EdgeCaseFixtures>({
225232
},
226233

227234
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
235+
// eslint-disable-next-line no-empty-pattern
228236
deeplyNestedSubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
229237
// Create a very deep nesting structure (but not exceeding MAX_NESTED_SUBGRAPHS)
230238
const nested = createNestedSubgraphs({
@@ -238,6 +246,7 @@ export const edgeCaseTest = subgraphTest.extend<EdgeCaseFixtures>({
238246
},
239247

240248
// @ts-expect-error TODO: Fix after merge - fixture use parameter type
249+
// eslint-disable-next-line no-empty-pattern
241250
maxIOSubgraph: async ({}, use: (value: unknown) => Promise<void>) => {
242251
// Create a subgraph with many inputs and outputs
243252
const inputs = Array.from({ length: 20 }, (_, i) => ({

src/lib/litegraph/test/testExtensions.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface DirtyFixtures {
3333
}
3434

3535
export const test = baseTest.extend<LitegraphFixtures>({
36+
// eslint-disable-next-line no-empty-pattern
3637
minimalGraph: async ({}, use) => {
3738
// Before each test function
3839
const serialisable = structuredClone(minimalSerialisableGraph)
@@ -47,13 +48,15 @@ export const test = baseTest.extend<LitegraphFixtures>({
4748
floatingLink as unknown as ISerialisedGraph
4849
),
4950
linkedNodesGraph: structuredClone(linkedNodes as unknown as ISerialisedGraph),
51+
// eslint-disable-next-line no-empty-pattern
5052
floatingBranchGraph: async ({}, use) => {
5153
const cloned = structuredClone(
5254
floatingBranch as unknown as ISerialisedGraph
5355
)
5456
const graph = new LGraph(cloned)
5557
await use(graph)
5658
},
59+
// eslint-disable-next-line no-empty-pattern
5760
reroutesComplexGraph: async ({}, use) => {
5861
const cloned = structuredClone(
5962
reroutesComplex as unknown as ISerialisedGraph
@@ -65,6 +68,7 @@ export const test = baseTest.extend<LitegraphFixtures>({
6568

6669
/** Test that use {@link DirtyFixtures}. One test per file. */
6770
export const dirtyTest = test.extend<DirtyFixtures>({
71+
// eslint-disable-next-line no-empty-pattern
6872
basicSerialisableGraph: async ({}, use) => {
6973
if (!basicSerialisableGraph.nodes) throw new Error('Invalid test object')
7074

0 commit comments

Comments
 (0)