Buckets:
ktongue/docker_container / .cache /opencode /node_modules /@fastify /merge-json-schemas /test /exclusive-minimum.test.js
| const assert = require('node:assert/strict') | |
| const { test } = require('node:test') | |
| const { mergeSchemas } = require('../index') | |
| const { defaultResolver } = require('./utils') | |
| test('should merge empty schema and exclusiveMinimum keyword', () => { | |
| const schema1 = { type: 'number' } | |
| const schema2 = { type: 'number', exclusiveMinimum: 42 } | |
| const mergedSchema = mergeSchemas([schema1, schema2], { defaultResolver }) | |
| assert.deepStrictEqual(mergedSchema, { type: 'number', exclusiveMinimum: 42 }) | |
| }) | |
| test('should merge equal exclusiveMinimum values', () => { | |
| const schema1 = { type: 'number', exclusiveMinimum: 42 } | |
| const schema2 = { type: 'number', exclusiveMinimum: 42 } | |
| const mergedSchema = mergeSchemas([schema1, schema2], { defaultResolver }) | |
| assert.deepStrictEqual(mergedSchema, { type: 'number', exclusiveMinimum: 42 }) | |
| }) | |
| test('should merge different exclusiveMinimum values', () => { | |
| const schema1 = { type: 'integer', exclusiveMinimum: 42 } | |
| const schema2 = { type: 'integer', exclusiveMinimum: 43 } | |
| const mergedSchema = mergeSchemas([schema1, schema2], { defaultResolver }) | |
| assert.deepStrictEqual(mergedSchema, { type: 'integer', exclusiveMinimum: 43 }) | |
| }) | |
Xet Storage Details
- Size:
- 1.21 kB
- Xet hash:
- 0bfedcd2691b5b311691441a5f70a06c4af0a77a7c670d58eca93a98b7dd1588
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.