Skip to content

Commit 8917178

Browse files
werwolf2303RandomByte
authored andcommitted
test(formatter): Add snapshot test for text formatter with no findings
1 parent c9307dd commit 8917178

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

test/lib/formatter/snapshots/text.ts.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ Generated by [AVA](https://avajs.dev).
4949
1 fatal error␊
5050
`
5151

52+
## Test Text Formatter (with no findings)
53+
54+
> Snapshot 1
55+
56+
`UI5 linter report:␊
57+
Success! No findings detected.␊
58+
`
59+
5260
## Test Text Formatter (with two fatal errors)
5361

5462
> Snapshot 1
34 Bytes
Binary file not shown.

test/lib/formatter/text.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ test("Test Text Formatter (with one fatal error)", (t) => {
6565
t.snapshot(res);
6666
});
6767

68+
test("Test Text Formatter (with no findings)", (t) => {
69+
const {fakePath} = t.context;
70+
const textFormatter = new Text(fakePath);
71+
const res = textFormatter.format([], false, false);
72+
t.snapshot(res);
73+
});
74+
6875
test("Test Text Formatter (with two fatal errors)", (t) => {
6976
const {fakePath} = t.context;
7077
const textFormatter = new Text(fakePath);

0 commit comments

Comments
 (0)