Skip to content

Commit b7604da

Browse files
authored
Update array.test.js
Signed-off-by: rtkevin <[email protected]>
1 parent c55c19f commit b7604da

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/array.test.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,34 @@ buildTest({
6161
dates: [new Date(1), new Date(2)]
6262
})
6363

64+
buildTest({
65+
title: 'dates tuple $ref',
66+
definitions: {
67+
dateTime: {
68+
type: 'string',
69+
format: 'date-time'
70+
}
71+
},
72+
type: 'object',
73+
properties: {
74+
dates: {
75+
type: 'array',
76+
minItems: 2,
77+
maxItems: 2,
78+
items: [
79+
{
80+
$ref: '#/definitions/dateTime'
81+
},
82+
{
83+
$ref: '#/definitions/dateTime'
84+
}
85+
]
86+
}
87+
}
88+
}, {
89+
dates: [new Date(1), new Date(2)]
90+
})
91+
6492
buildTest({
6593
title: 'string array',
6694
type: 'object',

0 commit comments

Comments
 (0)