mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-07 19:56:02 +00:00
build: migrate build system to Vite and test runner to Vitest & Remove
depracated husky usage - Replace Webpack with Vite for faster client bundling and HMR. - Migrate tests from Jest to Vitest and update configuration. - Update Web Worker instantiation to standard ESM syntax. - Implement Env utility in `src/core` for safe, hybrid environment variable access (Vite vs Node). - Refactor configuration loaders to remove direct `process.env` dependencies in shared code. - Update TypeScript environment definitions and project scripts for the new toolchain. - Remove the [depracated usage of the husky](https://github.com/typicode/husky/releases/tag/v9.0.1). build(vite): implement robust git commit resolution with fallback
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import { vi, type MockInstance } from "vitest";
|
||||
import { getMessageTypeClasses, severityColors } from "../src/client/Utils";
|
||||
import { MessageType } from "../src/core/game/Game";
|
||||
|
||||
describe("getMessageTypeClasses", () => {
|
||||
// Spy on console.warn to track when the default case is hit
|
||||
let consoleSpy: jest.SpyInstance;
|
||||
let consoleSpy: MockInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
consoleSpy = jest.spyOn(console, "warn").mockImplementation(() => {});
|
||||
consoleSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user