@nodaro/shared 3.14.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1679 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1822 -49
- package/dist/index.d.ts +1822 -49
- package/dist/index.js +1491 -82
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/apply-edl-credit-id.test.ts +25 -0
- package/src/__tests__/camera-switch-contract.test.ts +98 -0
- package/src/__tests__/competitors.test.ts +49 -0
- package/src/__tests__/content-recipe-ideas.test.ts +96 -0
- package/src/__tests__/edl-multicam.test.ts +192 -0
- package/src/__tests__/exposed-field-keys.test.ts +78 -0
- package/src/__tests__/instagram-scrape.test.ts +62 -0
- package/src/__tests__/llm-models.test.ts +5 -2
- package/src/__tests__/music-provider.test.ts +17 -0
- package/src/__tests__/node-runtime-keys.test.ts +11 -0
- package/src/__tests__/parameter-node-value.test.ts +2 -1
- package/src/__tests__/per-unit-video-pricing.test.ts +97 -0
- package/src/__tests__/producer-types.test.ts +35 -0
- package/src/__tests__/saved-posts.test.ts +37 -0
- package/src/__tests__/script-settings.test.ts +61 -0
- package/src/__tests__/settings-input.test.ts +252 -0
- package/src/__tests__/social-search.test.ts +243 -0
- package/src/__tests__/studio-sequence-owner.test.ts +356 -0
- package/src/__tests__/studio-take-voice.test.ts +200 -0
- package/src/__tests__/studio-transient.test.ts +71 -0
- package/src/__tests__/sub-gates.test.ts +21 -0
- package/src/__tests__/telegram-account-trigger.test.ts +120 -0
- package/src/__tests__/text-to-audio-pricing.test.ts +71 -0
- package/src/__tests__/tts-capabilities.test.ts +237 -0
- package/src/__tests__/video-analysis-pricing.test.ts +27 -13
- package/src/__tests__/video-link.test.ts +2 -2
- package/src/__tests__/video-utils.test.ts +89 -83
- package/src/__tests__/workflow-export-strip.test.ts +37 -0
- package/src/camera-switch-contract.ts +166 -0
- package/src/catalog-projection.ts +7 -0
- package/src/competitors.ts +430 -0
- package/src/content-recipe-ideas.ts +69 -0
- package/src/credit-estimators/index.ts +21 -0
- package/src/credit-estimators/ltx-extend.ts +33 -0
- package/src/credit-estimators/ltx-retake.ts +30 -0
- package/src/credit-estimators/text-to-audio.ts +58 -0
- package/src/credit-estimators/video-sfx.ts +41 -0
- package/src/credit-estimators/video-utils.ts +38 -24
- package/src/credit-identifiers.ts +22 -0
- package/src/edl-multicam.ts +220 -0
- package/src/exposed-field-keys.ts +49 -0
- package/src/fan-out-rows.ts +7 -2
- package/src/i18n/action-fx.ko.ts +18 -18
- package/src/i18n/action-fx.pt-BR.ts +66 -66
- package/src/i18n/aesthetic.ko.ts +49 -49
- package/src/i18n/aesthetic.pt-BR.ts +14 -14
- package/src/i18n/animals.ko.ts +126 -126
- package/src/i18n/animals.pt-BR.ts +33 -33
- package/src/i18n/atmosphere.ko.ts +37 -37
- package/src/i18n/atmosphere.pt-BR.ts +29 -29
- package/src/i18n/backdrop.ko.ts +40 -40
- package/src/i18n/backdrop.pt-BR.ts +38 -38
- package/src/i18n/camera-format.ko.ts +31 -31
- package/src/i18n/camera-format.pt-BR.ts +12 -12
- package/src/i18n/camera-motions.ko.ts +66 -66
- package/src/i18n/camera-motions.pt-BR.ts +51 -51
- package/src/i18n/character-fx.ko.ts +19 -19
- package/src/i18n/character-fx.pt-BR.ts +64 -52
- package/src/i18n/character-motion.ko.ts +164 -164
- package/src/i18n/character-motion.pt-BR.ts +867 -858
- package/src/i18n/color-look.ko.ts +41 -41
- package/src/i18n/color-look.pt-BR.ts +23 -23
- package/src/i18n/composition-effects.ko.ts +18 -18
- package/src/i18n/composition-effects.pt-BR.ts +17 -17
- package/src/i18n/era.ko.ts +28 -28
- package/src/i18n/era.pt-BR.ts +20 -20
- package/src/i18n/exposure-settings.ko.ts +20 -20
- package/src/i18n/exposure-settings.pt-BR.ts +3 -3
- package/src/i18n/framing.ko.ts +66 -66
- package/src/i18n/framing.pt-BR.ts +50 -50
- package/src/i18n/furniture.ko.ts +78 -78
- package/src/i18n/furniture.pt-BR.ts +46 -46
- package/src/i18n/held-prop.ko.ts +60 -60
- package/src/i18n/held-prop.pt-BR.ts +30 -30
- package/src/i18n/instrumentation.ko.ts +62 -62
- package/src/i18n/instrumentation.pt-BR.ts +64 -64
- package/src/i18n/lens.ko.ts +16 -16
- package/src/i18n/lens.pt-BR.ts +5 -5
- package/src/i18n/lighting.ko.ts +68 -68
- package/src/i18n/lighting.pt-BR.ts +43 -43
- package/src/i18n/loop-subject.ko.ts +1 -1
- package/src/i18n/loop-subject.pt-BR.ts +31 -31
- package/src/i18n/materials.ko.ts +66 -66
- package/src/i18n/materials.pt-BR.ts +22 -22
- package/src/i18n/mood.ko.ts +50 -50
- package/src/i18n/mood.pt-BR.ts +12 -12
- package/src/i18n/music-genre.ko.ts +28 -28
- package/src/i18n/music-genre.pt-BR.ts +50 -50
- package/src/i18n/music-mood.ko.ts +27 -27
- package/src/i18n/music-mood.pt-BR.ts +20 -20
- package/src/i18n/person.ko.ts +396 -396
- package/src/i18n/person.pt-BR.ts +237 -237
- package/src/i18n/photo-genre.ko.ts +46 -46
- package/src/i18n/photo-genre.pt-BR.ts +32 -32
- package/src/i18n/photographer.ko.ts +63 -63
- package/src/i18n/photographer.pt-BR.ts +15 -15
- package/src/i18n/pose.ko.ts +81 -81
- package/src/i18n/pose.pt-BR.ts +65 -65
- package/src/i18n/post-process-effects.ko.ts +18 -18
- package/src/i18n/post-process-effects.pt-BR.ts +18 -18
- package/src/i18n/render-quality.ko.ts +24 -24
- package/src/i18n/render-quality.pt-BR.ts +12 -12
- package/src/i18n/setting.ko.ts +64 -64
- package/src/i18n/setting.pt-BR.ts +41 -41
- package/src/i18n/style.ko.ts +49 -49
- package/src/i18n/style.pt-BR.ts +19 -19
- package/src/i18n/styling.ko.ts +265 -265
- package/src/i18n/styling.pt-BR.ts +141 -141
- package/src/i18n/temporal.ko.ts +18 -18
- package/src/i18n/temporal.pt-BR.ts +12 -12
- package/src/i18n/transitions.ko.ts +14 -14
- package/src/i18n/transitions.pt-BR.ts +83 -71
- package/src/i18n/vehicles.ko.ts +107 -107
- package/src/i18n/vehicles.pt-BR.ts +55 -55
- package/src/i18n/voice-character.ko.ts +19 -19
- package/src/i18n/voice-character.pt-BR.ts +19 -19
- package/src/i18n/voice-delivery.ko.ts +22 -22
- package/src/i18n/voice-delivery.pt-BR.ts +22 -22
- package/src/i18n/weapons.ko.ts +85 -85
- package/src/i18n/weapons.pt-BR.ts +46 -46
- package/src/index.ts +236 -1
- package/src/instagram-scrape.ts +91 -16
- package/src/llm-models.ts +11 -0
- package/src/model-catalog.ts +151 -16
- package/src/model-constants.ts +54 -16
- package/src/node-mappable-fields.ts +21 -5
- package/src/node-runtime-keys.ts +45 -0
- package/src/oauth-scopes.ts +28 -0
- package/src/parameter-node-value.ts +13 -5
- package/src/pipeline-defaults.ts +14 -0
- package/src/pipeline-state-types.ts +14 -0
- package/src/presentation-utils.ts +5 -1
- package/src/producer-types.ts +85 -0
- package/src/recast-segment-packs.ts +13 -0
- package/src/resolve-field-mappings.ts +15 -5
- package/src/saved-posts.ts +106 -0
- package/src/script-settings.ts +70 -0
- package/src/settings-input.ts +366 -0
- package/src/social-search.ts +467 -0
- package/src/studio-transient.ts +479 -7
- package/src/telegram-account-send.ts +32 -0
- package/src/telegram-account-trigger.ts +108 -0
- package/src/tts-capabilities.ts +75 -0
- package/src/video-analysis-pricing.ts +17 -6
- package/src/video-link.ts +16 -4
- package/src/workflow-export.ts +7 -0
|
@@ -400,10 +400,13 @@ describe("LLM_FEATURE_DEFAULTS", () => {
|
|
|
400
400
|
"workflow-copilot",
|
|
401
401
|
// Scene3D previz authoring — generate-3d-scene AND edit-3d-scene share it.
|
|
402
402
|
"3d-scene",
|
|
403
|
+
// "Steal the format" — Content Recipe and Content Ideas.
|
|
404
|
+
"content-recipe",
|
|
405
|
+
"content-ideas",
|
|
403
406
|
]
|
|
404
407
|
|
|
405
|
-
it("has entries for all
|
|
406
|
-
expect(Object.keys(LLM_FEATURE_DEFAULTS)).toHaveLength(
|
|
408
|
+
it("has entries for all 21 features", () => {
|
|
409
|
+
expect(Object.keys(LLM_FEATURE_DEFAULTS)).toHaveLength(21)
|
|
407
410
|
for (const feature of ALL_FEATURES) {
|
|
408
411
|
expect(LLM_FEATURE_DEFAULTS).toHaveProperty(feature)
|
|
409
412
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { DEFAULT_MUSIC_PROVIDER, MUSIC_PROVIDERS, MUSIC_PROVIDER_LABELS, resolveMusicProvider } from "../model-constants.js"
|
|
3
|
+
|
|
4
|
+
describe("resolveMusicProvider", () => {
|
|
5
|
+
it("keeps a model the node offers", () => {
|
|
6
|
+
for (const p of MUSIC_PROVIDERS) expect(resolveMusicProvider(p)).toBe(p)
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
// New nodes started on "suno"; older ones carry retired models.
|
|
10
|
+
it.each(["suno", "musicgen", "lyria", "bark", undefined, "", 7])("runs %s as the default model", (value) => {
|
|
11
|
+
expect(resolveMusicProvider(value)).toBe(DEFAULT_MUSIC_PROVIDER)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it("names every model it offers", () => {
|
|
15
|
+
for (const p of MUSIC_PROVIDERS) expect(MUSIC_PROVIDER_LABELS[p]).toBeTruthy()
|
|
16
|
+
})
|
|
17
|
+
})
|
|
@@ -30,6 +30,7 @@ describe("TRANSIENT_RUNTIME_KEYS", () => {
|
|
|
30
30
|
"__listTotal",
|
|
31
31
|
"__listCompleted",
|
|
32
32
|
"__listRunning",
|
|
33
|
+
"__runsInFlight",
|
|
33
34
|
"_upstreamRefresh",
|
|
34
35
|
"__upstreamCount",
|
|
35
36
|
"downloadPercent",
|
|
@@ -104,6 +105,16 @@ describe("stripTransientRuntimeData", () => {
|
|
|
104
105
|
expect(out[0]!.type).toBe("generate-image")
|
|
105
106
|
})
|
|
106
107
|
|
|
108
|
+
it("never saves a trigger's last run values — run history keeps them, under its retention", () => {
|
|
109
|
+
const trigger = {
|
|
110
|
+
id: "t1",
|
|
111
|
+
type: "telegram-account-trigger",
|
|
112
|
+
data: { label: "Inbox", chatIds: ["777"], __triggerData: { text: "a message", senderId: "555" } },
|
|
113
|
+
}
|
|
114
|
+
const [out] = stripTransientRuntimeData([trigger])
|
|
115
|
+
expect(out!.data).toEqual({ label: "Inbox", chatIds: ["777"] })
|
|
116
|
+
})
|
|
117
|
+
|
|
107
118
|
it("passes through nodes without data and avoids copying when nothing is transient", () => {
|
|
108
119
|
const bare = { id: "n2" } as { id: string; data?: Record<string, unknown> }
|
|
109
120
|
const clean = { id: "n3", data: { label: "T", prompt: "p" } }
|
|
@@ -143,8 +143,9 @@ describe("getParameterValue — character-motion", () => {
|
|
|
143
143
|
|
|
144
144
|
describe("VIDEO_ONLY_PARAMETER_NODE_TYPES", () => {
|
|
145
145
|
it("names exactly the pickers a still image must never receive", () => {
|
|
146
|
+
// + motion: how much the shot moves (a Settings-input clause on video nodes).
|
|
146
147
|
expect([...VIDEO_ONLY_PARAMETER_NODE_TYPES].sort()).toEqual(
|
|
147
|
-
["camera-motion", "character-fx", "character-motion", "temporal", "transition"],
|
|
148
|
+
["camera-motion", "character-fx", "character-motion", "motion", "temporal", "transition"],
|
|
148
149
|
)
|
|
149
150
|
})
|
|
150
151
|
it("is a subset of PARAMETER_NODE_TYPES", () => {
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
LTX_EXTEND_DURATION,
|
|
4
|
+
LTX_RETAKE_MIN_DURATION_SEC,
|
|
5
|
+
LTX_RETAKE_PER_SECOND_CREDIT_ID,
|
|
6
|
+
ltxRetakeDurationSec,
|
|
7
|
+
LTX_EXTEND_PER_SECOND_CREDIT_ID,
|
|
8
|
+
VIDEO_SFX_PRICING,
|
|
9
|
+
ltxExtendDurationSec,
|
|
10
|
+
videoSfxCreditId,
|
|
11
|
+
} from "../index.js"
|
|
12
|
+
|
|
13
|
+
describe("videoSfxCreditId", () => {
|
|
14
|
+
it.each([
|
|
15
|
+
[1, "replicate-mmaudio:8s"],
|
|
16
|
+
[5, "replicate-mmaudio:8s"],
|
|
17
|
+
[8, "replicate-mmaudio:8s"],
|
|
18
|
+
[8.3, "replicate-mmaudio:15s"],
|
|
19
|
+
[9, "replicate-mmaudio:15s"],
|
|
20
|
+
[12, "replicate-mmaudio:15s"],
|
|
21
|
+
[15, "replicate-mmaudio:15s"],
|
|
22
|
+
[16, "replicate-mmaudio:30s"],
|
|
23
|
+
[30, "replicate-mmaudio:30s"],
|
|
24
|
+
[31, "replicate-mmaudio:60s"],
|
|
25
|
+
[60, "replicate-mmaudio:60s"],
|
|
26
|
+
[61, "replicate-mmaudio:120s"],
|
|
27
|
+
[120, "replicate-mmaudio:120s"],
|
|
28
|
+
[121, "replicate-mmaudio:300s"],
|
|
29
|
+
[180, "replicate-mmaudio:300s"],
|
|
30
|
+
[300, "replicate-mmaudio:300s"],
|
|
31
|
+
])("%s s → %s", (seconds, id) => {
|
|
32
|
+
expect(videoSfxCreditId(seconds)).toBe(id)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it("prices the fallback length when the video could not be measured", () => {
|
|
36
|
+
const fallback = videoSfxCreditId(VIDEO_SFX_PRICING.FALLBACK_DURATION_SEC)
|
|
37
|
+
for (const unknown of [undefined, null, 0, -4, Number.NaN, Number.POSITIVE_INFINITY]) {
|
|
38
|
+
expect(videoSfxCreditId(unknown)).toBe(fallback)
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it("a length past the cap prices the last bucket", () => {
|
|
43
|
+
expect(videoSfxCreditId(VIDEO_SFX_PRICING.MAX_DURATION_SEC + 1)).toBe("replicate-mmaudio:300s")
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
describe("ltxExtendDurationSec", () => {
|
|
48
|
+
it("names the per-second price row", () => {
|
|
49
|
+
expect(LTX_EXTEND_PER_SECOND_CREDIT_ID).toBe("ltx-2.3-pro-extend:per-second")
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it.each([
|
|
53
|
+
[2, 2],
|
|
54
|
+
[6, 6],
|
|
55
|
+
[20, 20],
|
|
56
|
+
[7.4, 7],
|
|
57
|
+
[7.5, 8],
|
|
58
|
+
["8", 8],
|
|
59
|
+
[" 12 ", 12],
|
|
60
|
+
[0, 1],
|
|
61
|
+
[-3, 1],
|
|
62
|
+
[25, 20],
|
|
63
|
+
])("%j → %i seconds", (raw, seconds) => {
|
|
64
|
+
expect(ltxExtendDurationSec(raw)).toBe(seconds)
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
it("an absent or unreadable length is the model's default", () => {
|
|
68
|
+
for (const raw of [undefined, null, "", "abc", Number.NaN, {}, true]) {
|
|
69
|
+
expect(ltxExtendDurationSec(raw)).toBe(LTX_EXTEND_DURATION.DEFAULT_SEC)
|
|
70
|
+
}
|
|
71
|
+
expect(LTX_EXTEND_DURATION.DEFAULT_SEC).toBe(6)
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
describe("ltxRetakeDurationSec", () => {
|
|
76
|
+
it("names the per-second price row", () => {
|
|
77
|
+
expect(LTX_RETAKE_PER_SECOND_CREDIT_ID).toBe("ltx-2.3-pro-retake:per-second")
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it.each([
|
|
81
|
+
[2, 2],
|
|
82
|
+
[2.5, 2.5],
|
|
83
|
+
[12, 12],
|
|
84
|
+
["4", 4],
|
|
85
|
+
[1, 2],
|
|
86
|
+
[0, 2],
|
|
87
|
+
[-3, 2],
|
|
88
|
+
])("%j → %s seconds (never below the 2-second minimum)", (raw, seconds) => {
|
|
89
|
+
expect(ltxRetakeDurationSec(raw)).toBe(seconds)
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
it("an absent or unreadable window is the minimum", () => {
|
|
93
|
+
for (const raw of [undefined, null, "", "abc", Number.NaN, {}]) {
|
|
94
|
+
expect(ltxRetakeDurationSec(raw)).toBe(LTX_RETAKE_MIN_DURATION_SEC)
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
})
|
|
@@ -3,6 +3,10 @@ import {
|
|
|
3
3
|
AUDIO_PRODUCER_TYPES,
|
|
4
4
|
VIDEO_PRODUCER_TYPES,
|
|
5
5
|
DYNAMIC_PRODUCER_TYPES,
|
|
6
|
+
FAN_OUT_EACH_TYPES,
|
|
7
|
+
FAN_OUT_EACH_HANDLES,
|
|
8
|
+
defaultEdgeOutputMode,
|
|
9
|
+
listResultsServeHandle,
|
|
6
10
|
} from "../producer-types.js"
|
|
7
11
|
import { getOutputType } from "../presentation-utils.js"
|
|
8
12
|
|
|
@@ -102,3 +106,34 @@ describe("producer-types", () => {
|
|
|
102
106
|
expect(VIDEO_PRODUCER_TYPES.has("video-overlay")).toBe(true)
|
|
103
107
|
})
|
|
104
108
|
})
|
|
109
|
+
|
|
110
|
+
// Per-handle "each" defaults (decided 2026-10-04): Camera Switch run once per
|
|
111
|
+
// clip fans its EDL out to one render per clip, while its transcript — the same
|
|
112
|
+
// for every clip — stays one value, in every mode.
|
|
113
|
+
describe("defaultEdgeOutputMode / listResultsServeHandle", () => {
|
|
114
|
+
it("a FAN_OUT_EACH_TYPES source defaults to each on every handle; anything else to last", () => {
|
|
115
|
+
expect(defaultEdgeOutputMode("edit-plan", "edl")).toBe("each")
|
|
116
|
+
expect(defaultEdgeOutputMode("list", undefined)).toBe("each")
|
|
117
|
+
expect(defaultEdgeOutputMode("transcribe", "json")).toBe("last")
|
|
118
|
+
expect(defaultEdgeOutputMode(undefined, "edl")).toBe("last")
|
|
119
|
+
})
|
|
120
|
+
it("Camera Switch: the EDL handle (and no handle = its primary, the EDL) is each; the transcript is last", () => {
|
|
121
|
+
expect(defaultEdgeOutputMode("camera-switch", "edl")).toBe("each")
|
|
122
|
+
expect(defaultEdgeOutputMode("camera-switch", undefined)).toBe("each")
|
|
123
|
+
expect(defaultEdgeOutputMode("camera-switch", null)).toBe("each")
|
|
124
|
+
expect(defaultEdgeOutputMode("camera-switch", "transcript")).toBe("last")
|
|
125
|
+
})
|
|
126
|
+
it("only the each handles read the per-iteration results", () => {
|
|
127
|
+
expect(listResultsServeHandle("camera-switch", "edl")).toBe(true)
|
|
128
|
+
expect(listResultsServeHandle("camera-switch", undefined)).toBe(true)
|
|
129
|
+
expect(listResultsServeHandle("camera-switch", "transcript")).toBe(false)
|
|
130
|
+
expect(listResultsServeHandle("generate-image", "image")).toBe(true)
|
|
131
|
+
})
|
|
132
|
+
it("every per-handle entry names a primary and is not also a whole-node each type", () => {
|
|
133
|
+
for (const [type, entry] of Object.entries(FAN_OUT_EACH_HANDLES)) {
|
|
134
|
+
expect(entry.each.length, type).toBeGreaterThan(0)
|
|
135
|
+
expect(entry.primary, type).toBeTruthy()
|
|
136
|
+
expect(FAN_OUT_EACH_TYPES.has(type), type).toBe(false)
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
})
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest"
|
|
2
|
+
import { SAVED_POST_MAX_TAGS, SAVED_POST_TAG_MAX, normalizeSavedPostTags } from "../index.js"
|
|
3
|
+
|
|
4
|
+
describe("normalizeSavedPostTags", () => {
|
|
5
|
+
it("trims, lower-cases, drops a leading # and collapses inner spaces", () => {
|
|
6
|
+
expect(normalizeSavedPostTags([" #Hooks ", "Cold Open"])).toEqual(["hooks", "cold open"])
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
it("drops empty tags, repeats and anything that is not text", () => {
|
|
10
|
+
expect(normalizeSavedPostTags(["a", "A", "#a", "", " ", 7, null, "b"])).toEqual(["a", "b"])
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
it("caps each tag and the number of tags", () => {
|
|
14
|
+
const many = Array.from({ length: SAVED_POST_MAX_TAGS + 5 }, (_, i) => `tag${i}`)
|
|
15
|
+
expect(normalizeSavedPostTags(many)).toHaveLength(SAVED_POST_MAX_TAGS)
|
|
16
|
+
expect(normalizeSavedPostTags(["x".repeat(100)])[0]).toHaveLength(SAVED_POST_TAG_MAX)
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it("reads anything that is not a list as no tags", () => {
|
|
20
|
+
expect(normalizeSavedPostTags("hooks")).toEqual([])
|
|
21
|
+
expect(normalizeSavedPostTags(undefined)).toEqual([])
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it("keeps tags in other scripts", () => {
|
|
25
|
+
expect(normalizeSavedPostTags(["#פתיחה", "フック"])).toEqual(["פתיחה", "フック"])
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it("splits on commas in any script, so one typed line can hold several tags", () => {
|
|
29
|
+
expect(normalizeSavedPostTags(["hooks, openers"])).toEqual(["hooks", "openers"])
|
|
30
|
+
expect(normalizeSavedPostTags(["フック、書き出し"])).toEqual(["フック", "書き出し"])
|
|
31
|
+
expect(normalizeSavedPostTags(["훅,오프닝"])).toEqual(["훅", "오프닝"])
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
it("removes the characters that would change a tag filter's meaning", () => {
|
|
35
|
+
expect(normalizeSavedPostTags(['ho}o{ks', 'say "hi"', "back\\slash"])).toEqual(["hooks", "say hi", "backslash"])
|
|
36
|
+
})
|
|
37
|
+
})
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
readScriptSettings,
|
|
4
|
+
SCRIPT_SCENE_COUNT_RANGE,
|
|
5
|
+
SCRIPT_TARGET_DURATION_RANGE,
|
|
6
|
+
SCRIPT_TONE_MAX_LENGTH,
|
|
7
|
+
} from "../script-settings.js"
|
|
8
|
+
|
|
9
|
+
describe("readScriptSettings", () => {
|
|
10
|
+
it("passes typed values through", () => {
|
|
11
|
+
expect(readScriptSettings({ sceneCount: 4, tone: "dramatic", targetLength: 90, styleGuide: "noir" })).toEqual({
|
|
12
|
+
sceneCount: 4,
|
|
13
|
+
tone: "dramatic",
|
|
14
|
+
targetDuration: 90,
|
|
15
|
+
styleGuide: "noir",
|
|
16
|
+
})
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it("turns a number given as text into a whole number (a mapped Scene Count / Duration node)", () => {
|
|
20
|
+
const s = readScriptSettings({ sceneCount: "7", targetLength: "44.6" })
|
|
21
|
+
expect(s.sceneCount).toBe(7)
|
|
22
|
+
expect(s.targetDuration).toBe(45)
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it("clamps numbers to the route's ranges", () => {
|
|
26
|
+
expect(readScriptSettings({ sceneCount: 0, targetLength: 1 })).toMatchObject({
|
|
27
|
+
sceneCount: SCRIPT_SCENE_COUNT_RANGE.min,
|
|
28
|
+
targetDuration: SCRIPT_TARGET_DURATION_RANGE.min,
|
|
29
|
+
})
|
|
30
|
+
expect(readScriptSettings({ sceneCount: 500, targetLength: 99999 })).toMatchObject({
|
|
31
|
+
sceneCount: SCRIPT_SCENE_COUNT_RANGE.max,
|
|
32
|
+
targetDuration: SCRIPT_TARGET_DURATION_RANGE.max,
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it("drops a value it cannot use, so the generator's default applies", () => {
|
|
37
|
+
const s = readScriptSettings({ sceneCount: "many", targetLength: "", tone: " ", styleGuide: 42 })
|
|
38
|
+
expect(s).toEqual({ sceneCount: undefined, tone: undefined, targetDuration: undefined, styleGuide: undefined })
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
it("trims text and cuts the tone to its limit", () => {
|
|
42
|
+
const s = readScriptSettings({ tone: ` ${"a".repeat(SCRIPT_TONE_MAX_LENGTH + 50)} `, styleGuide: " warm " })
|
|
43
|
+
expect(s.tone).toHaveLength(SCRIPT_TONE_MAX_LENGTH)
|
|
44
|
+
expect(s.styleGuide).toBe("warm")
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it("reads the older keys only when the panel's field is absent", () => {
|
|
48
|
+
expect(readScriptSettings({ style: "somber", targetDuration: 30 })).toMatchObject({ tone: "somber", targetDuration: 30 })
|
|
49
|
+
expect(readScriptSettings({ tone: "bright", style: "somber", targetLength: 20, targetDuration: 30 })).toMatchObject({
|
|
50
|
+
tone: "bright",
|
|
51
|
+
targetDuration: 20,
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
it("resolves {Node Label} references in the style guide only", () => {
|
|
56
|
+
const refMap = new Map([["Brand", "teal and coral, rounded type"]])
|
|
57
|
+
const s = readScriptSettings({ styleGuide: "Use {Brand}. Keep {Missing} as typed.", tone: "{Brand}" }, refMap)
|
|
58
|
+
expect(s.styleGuide).toBe("Use teal and coral, rounded type. Keep {Missing} as typed.")
|
|
59
|
+
expect(s.tone).toBe("{Brand}")
|
|
60
|
+
})
|
|
61
|
+
})
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
SETTINGS_INPUT_CONSUMERS,
|
|
4
|
+
SETTINGS_INPUT_HANDLE,
|
|
5
|
+
applySettingsInput,
|
|
6
|
+
connectedSettingsSources,
|
|
7
|
+
resolveWiredSettings,
|
|
8
|
+
settingsInputAccepts,
|
|
9
|
+
settingsInputFields,
|
|
10
|
+
settingsProviderModels,
|
|
11
|
+
settingsSourceForField,
|
|
12
|
+
snapToModelDuration,
|
|
13
|
+
withWiredSettings,
|
|
14
|
+
isSettingsHintEdge,
|
|
15
|
+
} from "../settings-input.js"
|
|
16
|
+
import { NODE_MAPPABLE_FIELDS } from "../node-mappable-fields.js"
|
|
17
|
+
import { DEFAULT_VIDEO_PROVIDER, GVP_SUPPORTED_PROVIDERS, IMAGE_GEN_PROVIDERS, VIDEO_GEN_PROVIDERS } from "../model-constants.js"
|
|
18
|
+
import { fitAspectRatioToModel, normalizeVideoRequestParams } from "../model-catalog.js"
|
|
19
|
+
|
|
20
|
+
const nodes = [
|
|
21
|
+
{ id: "gv", type: "generate-video", data: { provider: "seedance-2", duration: 8, aspectRatio: "16:9" } },
|
|
22
|
+
{ id: "gi", type: "generate-image", data: { provider: "nano-banana-pro", providers: ["nano-banana-pro", "seedream"], aspectRatio: "16:9" } },
|
|
23
|
+
{ id: "nb", type: "provider", data: { label: "Image model", category: "image", provider: "nano-banana" } },
|
|
24
|
+
{ id: "gvp", type: "generate-video-pro", data: { provider: "seedance-2", duration: 30 } },
|
|
25
|
+
{ id: "ratio", type: "aspect-ratio", data: { label: "Aspect Ratio", ratio: "9:16" } },
|
|
26
|
+
{ id: "len", type: "duration", data: { label: "Duration", seconds: 60 } },
|
|
27
|
+
{ id: "len2", type: "duration", data: { label: "Short", seconds: 5 } },
|
|
28
|
+
{ id: "veo", type: "provider", data: { label: "Provider", category: "video", provider: "veo3" } },
|
|
29
|
+
{ id: "img", type: "provider", data: { label: "Image model", category: "image", provider: "nano-banana" } },
|
|
30
|
+
{ id: "tone", type: "tone", data: { label: "Tone", tone: "calm" } },
|
|
31
|
+
]
|
|
32
|
+
const typeOf = (id: string) => nodes.find((n) => n.id === id)?.type
|
|
33
|
+
const wire = (source: string, target = "gv", targetHandle: string = SETTINGS_INPUT_HANDLE) => ({ source, target, targetHandle })
|
|
34
|
+
|
|
35
|
+
describe("Settings input consumers", () => {
|
|
36
|
+
it("takes Aspect Ratio, Duration and Provider on Generate Video", () => {
|
|
37
|
+
for (const t of ["aspect-ratio", "duration", "provider"]) expect(settingsInputAccepts("generate-video", t)).toBe(true)
|
|
38
|
+
expect(settingsInputAccepts("generate-video", "tone")).toBe(false)
|
|
39
|
+
expect(settingsInputAccepts("generate-image", "duration")).toBe(false)
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// Generate Video Pro re-exports Generate Video's handle validator, which asks
|
|
43
|
+
// for "generate-video"'s list — so the two lists must be the same.
|
|
44
|
+
it("gives Generate Video Pro exactly Generate Video's settings", () => {
|
|
45
|
+
expect(SETTINGS_INPUT_CONSUMERS["generate-video-pro"]).toEqual(SETTINGS_INPUT_CONSUMERS["generate-video"])
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it("lists every field it sets as mappable, so both engines resolve it", () => {
|
|
49
|
+
for (const consumer of Object.keys(SETTINGS_INPUT_CONSUMERS)) {
|
|
50
|
+
for (const field of settingsInputFields(consumer)) expect(NODE_MAPPABLE_FIELDS[consumer]).toContain(field)
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it("accepts each consumer's own models", () => {
|
|
55
|
+
expect(settingsProviderModels("generate-video")).toEqual(VIDEO_GEN_PROVIDERS)
|
|
56
|
+
expect(settingsProviderModels("generate-video-pro")).toEqual(GVP_SUPPORTED_PROVIDERS)
|
|
57
|
+
expect(settingsProviderModels("generate-image")).toEqual(IMAGE_GEN_PROVIDERS)
|
|
58
|
+
expect(settingsProviderModels("llm-chat")).toEqual([])
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
it("takes Aspect Ratio and Provider on Generate Image, and no Duration", () => {
|
|
62
|
+
expect(settingsInputAccepts("generate-image", "aspect-ratio")).toBe(true)
|
|
63
|
+
expect(settingsInputAccepts("generate-image", "provider")).toBe(true)
|
|
64
|
+
expect(settingsInputAccepts("generate-image", "duration")).toBe(false)
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
describe("settingsSourceForField", () => {
|
|
69
|
+
it("finds the node that sets a field, and the last edge of a kind wins", () => {
|
|
70
|
+
const edges = [wire("len"), wire("len2")]
|
|
71
|
+
expect(settingsSourceForField("gv", "generate-video", "duration", edges, typeOf)).toBe("len2")
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
it("ignores other handles, other targets and nodes the input does not take", () => {
|
|
75
|
+
const edges = [wire("len", "gv", "prompt"), wire("len", "other"), wire("tone")]
|
|
76
|
+
expect(settingsSourceForField("gv", "generate-video", "duration", edges, typeOf)).toBeUndefined()
|
|
77
|
+
expect(connectedSettingsSources("gv", "generate-video", edges, typeOf)).toEqual([])
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
it("lists one source per kind, in the consumer's order", () => {
|
|
81
|
+
const edges = [wire("veo"), wire("len"), wire("ratio")]
|
|
82
|
+
expect(connectedSettingsSources("gv", "generate-video", edges, typeOf).map((c) => c.field)).toEqual(["aspectRatio", "duration", "provider"])
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
describe("snapToModelDuration", () => {
|
|
87
|
+
it("fits a length to the nearest one the model renders", () => {
|
|
88
|
+
expect(snapToModelDuration("seedance-2", 60)).toBe(15)
|
|
89
|
+
expect(snapToModelDuration("seedance-2", 1)).toBe(4)
|
|
90
|
+
expect(snapToModelDuration("veo3", 8)).toBe(8)
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
it("breaks a tie toward the shorter length, as the provider does", () => {
|
|
94
|
+
expect(snapToModelDuration("veo3", 7)).toBe(6)
|
|
95
|
+
expect(snapToModelDuration("grok-i2v", 8)).toBe(6)
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
it("keeps the value for a model without a duration list", () => {
|
|
99
|
+
expect(snapToModelDuration("not-a-model", 42)).toBe(42)
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
describe("applySettingsInput", () => {
|
|
104
|
+
const data = { provider: "veo3", duration: "60", aspectRatio: "4:5" }
|
|
105
|
+
|
|
106
|
+
it("changes nothing when no setting is wired", () => {
|
|
107
|
+
expect(applySettingsInput("generate-video", "gv", data, [], typeOf)).toEqual({ data })
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it("fits a wired Duration and Aspect Ratio to the model", () => {
|
|
111
|
+
const edges = [wire("len"), wire("ratio"), wire("veo")]
|
|
112
|
+
expect(applySettingsInput("generate-video", "gv", data, edges, typeOf).data).toMatchObject({ duration: 8, aspectRatio: "9:16" })
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
it("fits to the node's default model when no model is set", () => {
|
|
116
|
+
const edges = [wire("len")]
|
|
117
|
+
const fitted = applySettingsInput("generate-video", "gv", { duration: "60" }, edges, typeOf).data
|
|
118
|
+
expect(fitted.duration).toBe(snapToModelDuration(DEFAULT_VIDEO_PROVIDER, 60))
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
it("keeps Generate Video Pro's total length — its engine stitches and clamps it", () => {
|
|
122
|
+
const edges = [wire("len", "gvp")]
|
|
123
|
+
expect(applySettingsInput("generate-video-pro", "gvp", { provider: "seedance-2", duration: "60" }, edges, typeOf).data.duration).toBe("60")
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
it("refuses a wired Provider naming a model the node does not run", () => {
|
|
127
|
+
const edges = [wire("img")]
|
|
128
|
+
const result = applySettingsInput("generate-video", "gv", { provider: "nano-banana" }, edges, typeOf)
|
|
129
|
+
expect(result.problem).toEqual({ kind: "provider-not-accepted", sourceId: "img", value: "nano-banana" })
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
it("refuses a video model outside Generate Video Pro's models", () => {
|
|
133
|
+
const edges = [wire("veo", "gvp")]
|
|
134
|
+
const result = applySettingsInput("generate-video-pro", "gvp", { provider: "veo3" }, edges, typeOf)
|
|
135
|
+
expect(result.problem?.sourceId).toBe("veo")
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
describe("Generate Image", () => {
|
|
140
|
+
const wireImage = (source: string) => wire(source, "gi")
|
|
141
|
+
|
|
142
|
+
it("a wired Provider makes a several-model node one model", () => {
|
|
143
|
+
const resolved = resolveWiredSettings("gi", "generate-image", nodes[1]!.data, nodes, [wireImage("nb")])
|
|
144
|
+
expect(resolved.data).toMatchObject({ provider: "nano-banana", providers: ["nano-banana"] })
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
it("refuses a video model", () => {
|
|
148
|
+
expect(resolveWiredSettings("gi", "generate-image", nodes[1]!.data, nodes, [wireImage("veo")]).problem?.value).toBe("veo3")
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
it("fits a wired ratio to the image model", () => {
|
|
152
|
+
const resolved = resolveWiredSettings("gi", "generate-image", nodes[1]!.data, nodes, [wireImage("ratio")])
|
|
153
|
+
expect(resolved.data.aspectRatio).toBe(fitAspectRatioToModel("nano-banana-pro", "9:16"))
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
it("leaves the model list alone when no Provider is wired", () => {
|
|
157
|
+
const resolved = resolveWiredSettings("gi", "generate-image", nodes[1]!.data, nodes, [wireImage("ratio")])
|
|
158
|
+
expect(resolved.data.providers).toEqual(["nano-banana-pro", "seedream"])
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
describe("fitAspectRatioToModel", () => {
|
|
163
|
+
it("keeps a ratio the model lists, in the catalog's spelling", () => {
|
|
164
|
+
expect(fitAspectRatioToModel("seedance-2", "16:9")).toBe("16:9")
|
|
165
|
+
expect(fitAspectRatioToModel("seedance-2", "ADAPTIVE")).toBe("ADAPTIVE")
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
it("fits an unlisted ratio to the nearest listed one, keeping its orientation", () => {
|
|
169
|
+
expect(fitAspectRatioToModel("seedance-2", "4:5")).toBe("3:4")
|
|
170
|
+
expect(fitAspectRatioToModel("veo3", "4:5")).toBe("9:16")
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
it("passes through for a model without a ratio list or an unknown model", () => {
|
|
174
|
+
expect(fitAspectRatioToModel("kling-3.0", "4:5")).toBe("4:5")
|
|
175
|
+
expect(fitAspectRatioToModel("not-a-model", "4:5")).toBe("4:5")
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
// The video lane's normalizer applies the same rule — one implementation.
|
|
179
|
+
it("agrees with the video lane's normalizer", () => {
|
|
180
|
+
for (const ratio of ["4:5", "21:9", "1:1", "5:4", "2:3"]) {
|
|
181
|
+
expect(normalizeVideoRequestParams("seedance-2", { aspectRatio: ratio }).aspectRatio).toBe(fitAspectRatioToModel("seedance-2", ratio))
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
describe("withWiredSettings", () => {
|
|
187
|
+
it("returns the node as it runs, and the node itself without the graph", () => {
|
|
188
|
+
const image = nodes[1]!
|
|
189
|
+
expect(withWiredSettings(image, nodes, [wire("nb", "gi")]).data).toMatchObject({ providers: ["nano-banana"] })
|
|
190
|
+
expect(withWiredSettings(image)).toBe(image)
|
|
191
|
+
expect(withWiredSettings({ id: "t", type: "tone", data: {} }, nodes, [])).toEqual({ id: "t", type: "tone", data: {} })
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
describe("Motion (a prompt-clause setting)", () => {
|
|
196
|
+
const motion = { id: "mo", type: "motion", data: { label: "Motion", motion: "subtle" } }
|
|
197
|
+
const motion2 = { id: "mo2", type: "motion", data: { label: "Motion 2", motion: "dynamic" } }
|
|
198
|
+
const graph = [...nodes, motion, motion2]
|
|
199
|
+
const typeOfGraph = (id: string) => graph.find((n) => n.id === id)?.type
|
|
200
|
+
|
|
201
|
+
it("is taken by the video nodes, not by Generate Image, and sets no field", () => {
|
|
202
|
+
expect(settingsInputAccepts("generate-video", "motion")).toBe(true)
|
|
203
|
+
expect(settingsInputAccepts("generate-video-pro", "motion")).toBe(true)
|
|
204
|
+
expect(settingsInputAccepts("generate-image", "motion")).toBe(false)
|
|
205
|
+
expect(settingsInputFields("generate-video")).toEqual(["aspectRatio", "duration", "provider"])
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
it("is listed as wired, without a field, and writes nothing into the data", () => {
|
|
209
|
+
const resolved = resolveWiredSettings("gv", "generate-video", nodes[0]!.data, graph, [wire("mo")])
|
|
210
|
+
expect(resolved.wired).toEqual([{ sourceType: "motion", sourceId: "mo", value: "subtle" }])
|
|
211
|
+
expect(resolved.data).toEqual(nodes[0]!.data)
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
it("brings its clause only from the last Motion wired", () => {
|
|
215
|
+
const edges = [wire("mo"), wire("mo2")]
|
|
216
|
+
expect(isSettingsHintEdge(edges[0]!, "generate-video", edges, typeOfGraph)).toBe(false)
|
|
217
|
+
expect(isSettingsHintEdge(edges[1]!, "generate-video", edges, typeOfGraph)).toBe(true)
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
it("brings no clause into a node that does not take it, or through another handle", () => {
|
|
221
|
+
expect(isSettingsHintEdge(wire("mo", "gi"), "generate-image", [wire("mo", "gi")], typeOfGraph)).toBe(false)
|
|
222
|
+
expect(isSettingsHintEdge(wire("mo", "gv", "look"), "generate-video", [wire("mo", "gv", "look")], typeOfGraph)).toBe(false)
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
it("does not count as the field setting of its kind", () => {
|
|
226
|
+
expect(settingsSourceForField("gv", "generate-video", "duration", [wire("mo")], typeOfGraph)).toBeUndefined()
|
|
227
|
+
})
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
describe("resolveWiredSettings", () => {
|
|
231
|
+
it("writes each wired value in and fits it, as the engines do", () => {
|
|
232
|
+
const edges = [wire("len"), wire("ratio"), wire("veo")]
|
|
233
|
+
const resolved = resolveWiredSettings("gv", "generate-video", nodes[0]!.data, nodes, edges)
|
|
234
|
+
expect(resolved.data).toMatchObject({ provider: "veo3", duration: 8, aspectRatio: "9:16" })
|
|
235
|
+
expect(resolved.wired.map((w) => [w.field, w.value])).toEqual([
|
|
236
|
+
["aspectRatio", "9:16"],
|
|
237
|
+
["duration", "60"],
|
|
238
|
+
["provider", "veo3"],
|
|
239
|
+
])
|
|
240
|
+
expect(resolved.problem).toBeUndefined()
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
it("reports a Provider the node cannot run", () => {
|
|
244
|
+
const resolved = resolveWiredSettings("gv", "generate-video", nodes[0]!.data, nodes, [wire("img")])
|
|
245
|
+
expect(resolved.problem?.value).toBe("nano-banana")
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
it("returns the node's own data when nothing is wired", () => {
|
|
249
|
+
const resolved = resolveWiredSettings("gv", "generate-video", nodes[0]!.data, nodes, [])
|
|
250
|
+
expect(resolved).toEqual({ data: nodes[0]!.data, wired: [] })
|
|
251
|
+
})
|
|
252
|
+
})
|