Skip to content

Commit 563f4a7

Browse files
committed
test: fix resource content check
1 parent cb60a64 commit 563f4a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/cli.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { $, fs } from "zx";
1111
// TODO - More test coverage
1212
describe("postject CLI", () => {
1313
let filename;
14+
let resourceContents;
1415
let resourceFilename;
1516
const IS_WINDOWS = os.platform() === "win32";
1617

@@ -26,10 +27,11 @@ describe("postject CLI", () => {
2627
filename = temporaryFile({ extension: IS_WINDOWS ? "exe" : undefined });
2728
await fs.copy(originalFilename, filename);
2829

30+
resourceContents = crypto.randomBytes(64).toString("hex");
2931
resourceFilename = temporaryFile();
3032
await fs.writeFile(
3133
resourceFilename,
32-
crypto.randomBytes(64).toString("hex")
34+
resourceContents
3335
);
3436
});
3537

@@ -72,7 +74,7 @@ describe("postject CLI", () => {
7274
{
7375
const { exitCode, stdout } = await $`${filename}`;
7476
expect(exitCode).to.equal(0);
75-
expect(stdout).to.have.string("test");
77+
expect(stdout).to.have.string(resourceContents);
7678
}
7779
}).timeout(6000);
7880
});

0 commit comments

Comments
 (0)