|
|
|
@ -26,8 +26,48 @@ class MockContainer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
class MockGraphics extends MockContainer { |
|
|
|
clear(): this { |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
|
rect(): this { |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
|
roundRect(): this { |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
|
fill(): this { |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
|
stroke(): this { |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
class MockText extends MockContainer { |
|
|
|
text = ""; |
|
|
|
style: unknown; |
|
|
|
anchor = { |
|
|
|
set: () => {}, |
|
|
|
}; |
|
|
|
position = { |
|
|
|
set: () => {}, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
class MockTextStyle { |
|
|
|
constructor(_style?: Record<string, unknown>) {} |
|
|
|
} |
|
|
|
|
|
|
|
vi.mock("pixi.js", () => ({ |
|
|
|
Container: MockContainer, |
|
|
|
Graphics: MockGraphics, |
|
|
|
Text: MockText, |
|
|
|
TextStyle: MockTextStyle, |
|
|
|
})); |
|
|
|
|
|
|
|
vi.mock("@/core/Game", () => { |
|
|
|
|