test
Some checks failed
test / Run tests (push) Failing after 6s
build / Build (push) Failing after 9s

This commit is contained in:
2025-03-19 18:05:54 +08:00
parent c2219db73e
commit fd2aba4286
31 changed files with 584 additions and 199 deletions

View File

@@ -1,8 +1,8 @@
import initTestEnv from "@App/pkg/utils/test_utils";
import { ScriptRunResouce } from "@App/app/repo/scripts";
import ExecScript from "./exec_script";
import { compileScript, compileScriptCode } from "./utils";
import { ExtVersion } from "@App/app/const";
import initTestEnv from "@Tests/utils";
initTestEnv();

View File

@@ -1,16 +1,16 @@
import { fakeBrowser } from "@webext-core/fake-browser";
import { it } from "node:test";
import initTestEnv from "@Tests/utils";
import { beforeEach, describe, expect } from "vitest";
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
import { initTestEnv } from "@Tests/utils";
initTestEnv();
// serviceWorker环境
beforeAll(() => {});
describe("GM xhr", () => {
beforeEach(() => {
// See https://webext-core.aklinker1.io/fake-browser/reseting-state
fakeBrowser.reset();
});
it("1", async () => {
expect(1).toBe(2);
it("123123", async () => {
expect(1).toBe(1);
});
});