File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
src/core/plugins/json-schema-2020-12-samples/fn/generators
test/unit/core/plugins/json-schema-2020-12-samples Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 11/**
22 * @prettier
33 */
4- const int32Generator = ( ) => ( 2 ** 30 ) >>> 0
4+ const int32Generator = ( ) => 0
55
66export default int32Generator
Original file line number Diff line number Diff line change 11/**
22 * @prettier
33 */
4- const int64Generator = ( ) => 2 ** 53 - 1
4+ const int64Generator = ( ) => 0
55
66export default int64Generator
Original file line number Diff line number Diff line change @@ -79,12 +79,8 @@ describe("sampleFromSchema", () => {
7979 expect ( sample ( { type : "number" , format : "float" } ) ) . toStrictEqual ( 0.1 )
8080 expect ( sample ( { type : "number" , format : "double" } ) ) . toStrictEqual ( 0.1 )
8181 expect ( sample ( { type : "integer" } ) ) . toStrictEqual ( 0 )
82- expect ( sample ( { type : "integer" , format : "int32" } ) ) . toStrictEqual (
83- ( 2 ** 30 ) >>> 0
84- )
85- expect ( sample ( { type : "integer" , format : "int64" } ) ) . toStrictEqual (
86- 2 ** 53 - 1
87- )
82+ expect ( sample ( { type : "integer" , format : "int32" } ) ) . toStrictEqual ( 0 )
83+ expect ( sample ( { type : "integer" , format : "int64" } ) ) . toStrictEqual ( 0 )
8884 expect ( sample ( { type : "boolean" } ) ) . toStrictEqual ( true )
8985 expect ( sample ( { type : "null" } ) ) . toStrictEqual ( null )
9086 } )
You can’t perform that action at this time.
0 commit comments