Skip to content

Commit 7e66e63

Browse files
authored
Adjusts 'formatIs' tester for consistency
Besides 'formatIs' all other testers only check whether their type is part of the JSON Schema type array. This adjusts 'formatIs' to behave the same instead of forcing the type to only be of type 'string'.
1 parent 2802d29 commit 7e66e63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/testers/testers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const formatIs = (expectedFormat: string): Tester =>
144144
schema =>
145145
!isEmpty(schema) &&
146146
schema.format === expectedFormat &&
147-
schema.type === 'string'
147+
hasType(schema, 'string')
148148
);
149149

150150
/**

0 commit comments

Comments
 (0)