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
3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
2
* @prettier
3
3
*/
4
- const int32Generator = ( ) => ( 2 ** 30 ) >>> 0
4
+ const int32Generator = ( ) => 0
5
5
6
6
export default int32Generator
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @prettier
3
3
*/
4
- const int64Generator = ( ) => 2 ** 53 - 1
4
+ const int64Generator = ( ) => 0
5
5
6
6
export default int64Generator
Original file line number Diff line number Diff line change @@ -79,12 +79,8 @@ describe("sampleFromSchema", () => {
79
79
expect ( sample ( { type : "number" , format : "float" } ) ) . toStrictEqual ( 0.1 )
80
80
expect ( sample ( { type : "number" , format : "double" } ) ) . toStrictEqual ( 0.1 )
81
81
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 )
88
84
expect ( sample ( { type : "boolean" } ) ) . toStrictEqual ( true )
89
85
expect ( sample ( { type : "null" } ) ) . toStrictEqual ( null )
90
86
} )
You can’t perform that action at this time.
0 commit comments