11import { describe , expect , test } from '@jest/globals' ;
22import { DEFAULT_OPTIONS , parseConfig } from '../transforms/helpers/options' ;
3- import { makeLogMatcher } from './helpers/expect-logs ' ;
3+ import { makeMultilineMatcher } from './helpers/expect-multiline ' ;
44
55describe ( 'options' , ( ) => {
66 describe ( 'parseConfig' , ( ) => {
@@ -60,7 +60,7 @@ describe('options', () => {
6060 test ( 'it errors for invalid `decorators` config' , ( ) => {
6161 expect ( ( ) => parseConfig ( 'test' , { decorators : 'oops' } ) ) . toThrow (
6262 new RegExp (
63- makeLogMatcher (
63+ makeMultilineMatcher (
6464 'test Config Error' ,
6565 "[decorators] Expected DecoratorOptions object or boolean, received 'oops'"
6666 )
@@ -95,7 +95,7 @@ describe('options', () => {
9595 test ( `it errors for invalid \`${ fieldName } \` config` , ( ) => {
9696 expect ( ( ) => parseConfig ( 'test' , { [ fieldName ] : 'oops' } ) ) . toThrow (
9797 new RegExp (
98- makeLogMatcher (
98+ makeMultilineMatcher (
9999 'test Config Error' ,
100100 `[${ fieldName } ] Expected boolean, received string`
101101 )
@@ -119,7 +119,7 @@ describe('options', () => {
119119 test ( 'it errors for invalid `quote` config' , ( ) => {
120120 expect ( ( ) => parseConfig ( 'test' , { quote : 'oops' } ) ) . toThrow (
121121 new RegExp (
122- makeLogMatcher (
122+ makeMultilineMatcher (
123123 'test Config Error' ,
124124 "[quote] Expected 'single' or 'double', received 'oops"
125125 )
@@ -157,7 +157,7 @@ describe('options', () => {
157157 parseConfig ( 'test' , { ignoreLeakingState : false } )
158158 ) . toThrow (
159159 new RegExp (
160- makeLogMatcher (
160+ makeMultilineMatcher (
161161 'test Config Error' ,
162162 '[ignoreLeakingState] Expected array of strings or comma-separated string, received false'
163163 )
@@ -178,7 +178,7 @@ describe('options', () => {
178178 test ( 'it errors for invalid `type` config' , ( ) => {
179179 expect ( ( ) => parseConfig ( 'test' , { type : 'oops' } ) ) . toThrow (
180180 new RegExp (
181- makeLogMatcher (
181+ makeMultilineMatcher (
182182 'test Config Error' ,
183183 "[type] Expected 'services', 'routes', 'components', or 'controllers', received 'oops"
184184 )
0 commit comments