Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Jul 5, 2024
1 parent 31859fb commit 62e28d0
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 221 deletions.
13 changes: 2 additions & 11 deletions __test__/danger_string/index.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from "ava";
import { getDangerStringsUsage } from "../../index.js";
import { fileURLToPath } from "node:url";
import { dirname, relative } from "node:path";
import { dirname, posix } from "node:path";

// 获取当前文件的路径
const __filename = fileURLToPath(import.meta.url);
Expand All @@ -11,14 +11,5 @@ test("getUsageOfDangerStrings", (t) => {
const response = getDangerStringsUsage(["bootcss.com", "bootcdn.com", "polyfill.com", "polyfill.io"], {
cwd,
});
t.snapshot(
response
.sort((x) => x.filePath)
.map((x) => {
return {
...x,
filePath: relative(cwd, x.filePath),
};
}),
);
t.is(response.length, 7);
});
61 changes: 0 additions & 61 deletions __test__/danger_string/index.spec.mjs.md

This file was deleted.

Binary file removed __test__/danger_string/index.spec.mjs.snap
Binary file not shown.
13 changes: 2 additions & 11 deletions __test__/module_member_usage/index.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from "ava";
import { getModuleMemberUsage } from "../../index.js";
import { fileURLToPath } from "node:url";
import { dirname, relative } from "node:path";
import { dirname, posix } from "node:path";

// 获取当前文件的路径
const __filename = fileURLToPath(import.meta.url);
Expand All @@ -11,14 +11,5 @@ test("getModuleMemberUsage", (t) => {
const response = getModuleMemberUsage(["antd"], {
cwd,
});
t.snapshot(
response
.sort((x) => x.filePath)
.map((x) => {
return {
...x,
filePath: relative(cwd, x.filePath),
};
}),
);
t.is(response.length, 18);
});
138 changes: 0 additions & 138 deletions __test__/module_member_usage/index.spec.mjs.md

This file was deleted.

Binary file removed __test__/module_member_usage/index.spec.mjs.snap
Binary file not shown.

0 comments on commit 62e28d0

Please sign in to comment.