import { matcherToArray } from 'contexts/Modifiers/utils/matcherToArray' ; import { Matcher } from 'types/Matchers' ; const matcher = jest . fn ( ) ; describe ( 'when a Matcher is passed in' , ( ) => { test ( 'should return an array with the Matcher' , ( ) => { expect ( matcherToArray ( matcher ) ) . toStrictEqual ( [ matcher ] ) ; } ) ; } ) ; describe ( 'when an array of Matchers is passed in' , ( ) => { test ( 'should return the array' , ( ) => { expect ( matcherToArray ( [ matcher ] ) ) . toStrictEqual ( [ matcher ] ) ; } ) ; } ) ; describe ( 'when undefined is passed in' , ( ) => { test ( 'should return an empty array' , ( ) => { expect ( matcherToArray ( undefined ) ) . toStrictEqual ( [ ] ) ; } ) ; } ) ;