Skip to content

Commit

Permalink
test: ensure we only test against 2.0.0...2.0.1
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Sep 21, 2023
1 parent b96f29b commit b8ac74c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions __tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ beforeAll(() => {
execaSync("git", fetchArgs, execaOptions);
cwd = process.cwd();
process.chdir(TMP_DIR);

let currentDate = new Date("2023-09-21T23:31:48.180Z");

// remove tags prior to 2.0.1
let tagsToRemove = execaSync("git", [
"tag",
"-l",
"--sort",
"-creatordate",
"--format",
"%(refname:strip=2) %(taggerdate)",
])
.stdout.split("\n")
.filter((line) => {
let [, tagTag] = line.split(" ");
let date = new Date(tagTag);
return date < currentDate;
});
console.log(tagsToRemove);
});

afterAll(() => {
Expand Down

0 comments on commit b8ac74c

Please sign in to comment.