1
1
import { afterEach , beforeEach , describe , expect , it , spyOn } from 'bun:test' ;
2
2
import ERROR_MOCKS from '__tests__/_errors.mock' ;
3
3
import { Formatter , type FormatterOptions } from 'src/blueprints' ;
4
- import { supressedFormatter } from 'src/formatters' ;
4
+ import { suppressedFormatter } from 'src/formatters' ;
5
5
import { defaultParser } from 'src/parsers' ;
6
6
7
7
const EXPECTED_OUTPUT = {
8
8
PRETTY : 'suppressed 10 tsc errors.' ,
9
9
NOT_PRETTY : 'suppressed 10 tsc errors.'
10
10
} ;
11
11
12
- describe ( 'formatters > supressedFormatter ' , ( ) => {
12
+ describe ( 'formatters > suppressedFormatter ' , ( ) => {
13
13
let options : FormatterOptions ;
14
14
15
15
beforeEach ( ( ) => {
@@ -20,20 +20,20 @@ describe('formatters > supressedFormatter', () => {
20
20
} ) ;
21
21
22
22
it ( 'should be instance of Formatter' , ( ) => {
23
- expect ( supressedFormatter ) . toBeInstanceOf ( Formatter ) ;
23
+ expect ( suppressedFormatter ) . toBeInstanceOf ( Formatter ) ;
24
24
} ) ;
25
25
26
26
describe ( 'output test' , ( ) => {
27
27
describe ( 'empty errors' , ( ) => {
28
28
it ( 'should return empty string' , ( ) => {
29
- expect ( supressedFormatter . format ( '' ) ) . toBe ( '' ) ;
29
+ expect ( suppressedFormatter . format ( '' ) ) . toBe ( '' ) ;
30
30
} ) ;
31
31
} ) ;
32
32
33
33
describe ( 'non-empty errors' , ( ) => {
34
34
describe ( 'pretty format enabled' , ( ) => {
35
35
it ( 'should return correctly' , ( ) => {
36
- expect ( supressedFormatter . format ( ERROR_MOCKS . PRETTY , options ) ) . toBe (
36
+ expect ( suppressedFormatter . format ( ERROR_MOCKS . PRETTY , options ) ) . toBe (
37
37
`${ options . prefix } ${ EXPECTED_OUTPUT . PRETTY } ${ options . suffix } `
38
38
) ;
39
39
} ) ;
@@ -42,7 +42,7 @@ describe('formatters > supressedFormatter', () => {
42
42
describe ( 'pretty format disabled' , ( ) => {
43
43
it ( 'should return correctly' , ( ) => {
44
44
expect (
45
- supressedFormatter . format ( ERROR_MOCKS . NOT_PRETTY , options )
45
+ suppressedFormatter . format ( ERROR_MOCKS . NOT_PRETTY , options )
46
46
) . toBe (
47
47
`${ options . prefix } ${ EXPECTED_OUTPUT . NOT_PRETTY } ${ options . suffix } `
48
48
) ;
@@ -65,7 +65,7 @@ describe('formatters > supressedFormatter', () => {
65
65
66
66
it ( 'should call parse method from defaultParser instance' , ( ) => {
67
67
expect ( spyParse ) . toHaveBeenCalledTimes ( 0 ) ;
68
- supressedFormatter . format ( '' ) ;
68
+ suppressedFormatter . format ( '' ) ;
69
69
expect ( spyParse ) . toHaveBeenCalledTimes ( 1 ) ;
70
70
} ) ;
71
71
} ) ;
0 commit comments