Skip to content

Commit d2e2696

Browse files
committed
fix unit tests
1 parent 3cf450f commit d2e2696

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

tests/unit/docs.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ describe("docs task guides", () => {
99
it("points task guides at ordered documentation pages", () => {
1010
const orderedSlugs = new Set(DOC_ORDER);
1111

12-
expect(DOC_TASK_GUIDES).toHaveLength(8);
12+
expect(DOC_TASK_GUIDES).toHaveLength(9);
1313
expect(DOC_TASK_GUIDES.map((guide) => guide.id)).toEqual([
1414
"capture",
1515
"pose",
16+
"materials",
1617
"effects",
1718
"export",
1819
"workflows",

tests/unit/effects-store.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,23 @@ describe("effects store stack", () => {
6868
expect(state.order).toHaveLength(4);
6969
expect(state.order.map((uuid) => state.effects[uuid].type)).toEqual([
7070
"pixelation",
71-
"colorDepth",
7271
"dither",
72+
"colorDepth",
7373
"gammaCorrection",
7474
]);
7575
});
7676

7777
it("replaces existing stack with a preset", () => {
7878
useEffectsStore.getState().initEffect("bloom");
79-
useEffectsStore.getState().applyEffectsPreset("depth-debug", "replace");
79+
useEffectsStore.getState().applyEffectsPreset("toon", "replace");
8080

8181
const state = useEffectsStore.getState();
8282
expect(state.order.map((uuid) => state.effects[uuid].type)).toEqual([
83-
"depth",
84-
"outline",
83+
"edgeOutline",
84+
"colorDepth",
85+
"hueSaturation",
86+
"brightnessContrast",
87+
"gammaCorrection",
8588
]);
8689
});
8790

tests/unit/project-migration.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("project migrations", () => {
1919
effects: {},
2020
});
2121

22-
expect(migrated.version).toBe(5);
22+
expect(migrated.version).toBe(6);
2323
expect("materials" in migrated).toBe(true);
2424
expect(migrated.materials).toEqual({
2525
materials: {},
@@ -40,5 +40,12 @@ describe("project migrations", () => {
4040
models: {},
4141
hiddenAnimations: {},
4242
});
43+
expect(migrated.spritePostprocess).toEqual({
44+
enabled: false,
45+
effects: [],
46+
selectedRow: 0,
47+
selectedFrame: 0,
48+
compareBeforeAfter: false,
49+
});
4350
});
4451
});

0 commit comments

Comments
 (0)