1
1
import { describe , expect , test } from '@jest/globals' ;
2
2
import { DEFAULT_OPTIONS , parseConfig } from '../transforms/helpers/options' ;
3
- import { makeLogMatcher } from './helpers/expect-logs ' ;
3
+ import { makeMultilineMatcher } from './helpers/expect-multiline ' ;
4
4
5
5
describe ( 'options' , ( ) => {
6
6
describe ( 'parseConfig' , ( ) => {
@@ -60,7 +60,7 @@ describe('options', () => {
60
60
test ( 'it errors for invalid `decorators` config' , ( ) => {
61
61
expect ( ( ) => parseConfig ( 'test' , { decorators : 'oops' } ) ) . toThrow (
62
62
new RegExp (
63
- makeLogMatcher (
63
+ makeMultilineMatcher (
64
64
'test Config Error' ,
65
65
"[decorators] Expected DecoratorOptions object or boolean, received 'oops'"
66
66
)
@@ -95,7 +95,7 @@ describe('options', () => {
95
95
test ( `it errors for invalid \`${ fieldName } \` config` , ( ) => {
96
96
expect ( ( ) => parseConfig ( 'test' , { [ fieldName ] : 'oops' } ) ) . toThrow (
97
97
new RegExp (
98
- makeLogMatcher (
98
+ makeMultilineMatcher (
99
99
'test Config Error' ,
100
100
`[${ fieldName } ] Expected boolean, received string`
101
101
)
@@ -119,7 +119,7 @@ describe('options', () => {
119
119
test ( 'it errors for invalid `quote` config' , ( ) => {
120
120
expect ( ( ) => parseConfig ( 'test' , { quote : 'oops' } ) ) . toThrow (
121
121
new RegExp (
122
- makeLogMatcher (
122
+ makeMultilineMatcher (
123
123
'test Config Error' ,
124
124
"[quote] Expected 'single' or 'double', received 'oops"
125
125
)
@@ -157,7 +157,7 @@ describe('options', () => {
157
157
parseConfig ( 'test' , { ignoreLeakingState : false } )
158
158
) . toThrow (
159
159
new RegExp (
160
- makeLogMatcher (
160
+ makeMultilineMatcher (
161
161
'test Config Error' ,
162
162
'[ignoreLeakingState] Expected array of strings or comma-separated string, received false'
163
163
)
@@ -178,7 +178,7 @@ describe('options', () => {
178
178
test ( 'it errors for invalid `type` config' , ( ) => {
179
179
expect ( ( ) => parseConfig ( 'test' , { type : 'oops' } ) ) . toThrow (
180
180
new RegExp (
181
- makeLogMatcher (
181
+ makeMultilineMatcher (
182
182
'test Config Error' ,
183
183
"[type] Expected 'services', 'routes', 'components', or 'controllers', received 'oops"
184
184
)
0 commit comments