mirror of
https://fastgit.cc/github.com/openclaw/openclaw
synced 2026-05-01 06:36:23 +08:00
fix(ci): prepare plugin sdk dts before lint
This commit is contained in:
17
test/scripts/run-oxlint.test.ts
Normal file
17
test/scripts/run-oxlint.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { shouldPrepareExtensionPackageBoundaryArtifacts } from "../../scripts/run-oxlint.mjs";
|
||||
|
||||
describe("run-oxlint", () => {
|
||||
it("prepares extension package boundary artifacts for normal lint runs", () => {
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts([])).toBe(true);
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["src/index.ts"])).toBe(true);
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--type-aware"])).toBe(true);
|
||||
});
|
||||
|
||||
it("skips artifact preparation for metadata-only oxlint commands", () => {
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--help"])).toBe(false);
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--version"])).toBe(false);
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--print-config"])).toBe(false);
|
||||
expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--rules"])).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user