You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.actual(args: string[]) //imply binary if defined a common
33
+
.actual(args: string[]) //Imply binary if defined a common
34
34
```
35
35
36
36
#### Expected
37
37
38
38
```ts
39
-
.expected(binary: string, arg?:string[])
40
-
.expected(args: string[]) // imply binary if defined a common
39
+
.expected(feedback: {
40
+
stdout?: string|string[]; // Either text as is, or array of lines
41
+
stderr?:string|string[];
42
+
})
43
+
.expected(stdout: string|string[]) // Only check stdout
41
44
```
42
45
46
+
> The execution output to be compared is whitespace normalised, i.e. any non-break whitespace character is condensed to a single space.
47
+
43
48
### Value-based Assertion
44
49
45
50
```ts
46
-
newCLITest("List files")
47
-
.actual(<expression>)
48
-
.expected(<expression>);
51
+
newCLITest("Print working directory")
52
+
.actual("pwd")
53
+
.expected("/Users/rjs/app");
49
54
```
50
55
51
56
## Comparison Strategy
52
57
53
-
...
58
+
Before a comparison of a binary execution output, it is whitespace normalised. This is, any non-break whitespace character is condensed to a single space.
0 commit comments