Skip to content

Commit b8ac74c

Browse files
committed
test: ensure we only test against 2.0.0...2.0.1
Signed-off-by: Logan McAnsh <[email protected]>
1 parent b96f29b commit b8ac74c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

__tests__/index.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ beforeAll(() => {
2424
execaSync("git", fetchArgs, execaOptions);
2525
cwd = process.cwd();
2626
process.chdir(TMP_DIR);
27+
28+
let currentDate = new Date("2023-09-21T23:31:48.180Z");
29+
30+
// remove tags prior to 2.0.1
31+
let tagsToRemove = execaSync("git", [
32+
"tag",
33+
"-l",
34+
"--sort",
35+
"-creatordate",
36+
"--format",
37+
"%(refname:strip=2) %(taggerdate)",
38+
])
39+
.stdout.split("\n")
40+
.filter((line) => {
41+
let [, tagTag] = line.split(" ");
42+
let date = new Date(tagTag);
43+
return date < currentDate;
44+
});
45+
console.log(tagsToRemove);
2746
});
2847

2948
afterAll(() => {

0 commit comments

Comments
 (0)