Skip to content

Commit

Permalink
#80 tweak to exclude dist files in all-files hash test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajvincent committed Mar 21, 2024
1 parent f2fe699 commit 71d21d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stage_3_snapshot/spec-snapshot/fileHashes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,12 @@ describe("File hashes match for", () => {
stage_three_hashes
] = (await hashDirectories(stage_two_snapshot, stage_three_snapshot)) as [string[], string[]];

stage_three_hashes.splice(stage_three_hashes.findIndex(f => f.endsWith(" /dist/exports.d.ts")), 1);
stage_three_hashes.splice(stage_three_hashes.findIndex(f => f.endsWith(" /dist/exports.js")), 1);
let index = stage_three_hashes.findIndex(f => f.endsWith(" /dist/exports.d.ts"));
if ((index > -1) && !stage_two_hashes.find(f => f.endsWith(" /dist/exports.d.ts")))
stage_three_hashes.splice(index, 1);
index = stage_three_hashes.findIndex(f => f.endsWith(" /dist/exports.js"));
if ((index > -1) && !stage_two_hashes.find(f => f.endsWith(" /dist/exports.js")))
stage_three_hashes.splice(index, 1);

const diffFileHashes = getArrayDiff(stage_two_hashes, stage_three_hashes);
expect(diffFileHashes).withContext("file hashes").toEqual([]);
Expand Down

0 comments on commit 71d21d8

Please sign in to comment.