File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { $, fs } from "zx";
11
11
// TODO - More test coverage
12
12
describe ( "postject CLI" , ( ) => {
13
13
let filename ;
14
+ let resourceContents ;
14
15
let resourceFilename ;
15
16
const IS_WINDOWS = os . platform ( ) === "win32" ;
16
17
@@ -26,10 +27,11 @@ describe("postject CLI", () => {
26
27
filename = temporaryFile ( { extension : IS_WINDOWS ? "exe" : undefined } ) ;
27
28
await fs . copy ( originalFilename , filename ) ;
28
29
30
+ resourceContents = crypto . randomBytes ( 64 ) . toString ( "hex" ) ;
29
31
resourceFilename = temporaryFile ( ) ;
30
32
await fs . writeFile (
31
33
resourceFilename ,
32
- crypto . randomBytes ( 64 ) . toString ( "hex" )
34
+ resourceContents
33
35
) ;
34
36
} ) ;
35
37
@@ -72,7 +74,7 @@ describe("postject CLI", () => {
72
74
{
73
75
const { exitCode, stdout } = await $ `${ filename } ` ;
74
76
expect ( exitCode ) . to . equal ( 0 ) ;
75
- expect ( stdout ) . to . have . string ( "test" ) ;
77
+ expect ( stdout ) . to . have . string ( resourceContents ) ;
76
78
}
77
79
} ) . timeout ( 6000 ) ;
78
80
} ) ;
You can’t perform that action at this time.
0 commit comments