@@ -2,7 +2,7 @@ var test = require('tape')
22 , convert = require ( '../' )
33;
44
5- test ( 'iterates allOfs and converts types ' , function ( assert ) {
5+ test ( 'iterates allOfs' , function ( assert ) {
66 var schema
77 , result
88 , expected
@@ -17,14 +17,16 @@ test('iterates allOfs and converts types', function(assert) {
1717 required : [ 'foo' ] ,
1818 properties : {
1919 foo : {
20- type : 'long'
20+ type : 'integer' ,
21+ format : 'int64'
2122 }
2223 }
2324 } ,
2425 {
2526 allOf : [
2627 {
27- type : 'double'
28+ type : 'number' ,
29+ format : 'double'
2830 }
2931 ]
3032 }
@@ -60,7 +62,7 @@ test('iterates allOfs and converts types', function(assert) {
6062 assert . deepEqual ( result , expected , 'iterated allOfs' ) ;
6163} ) ;
6264
63- test ( 'iterates anyOfs and converts types ' , function ( assert ) {
65+ test ( 'iterates anyOfs' , function ( assert ) {
6466 var schema
6567 , result
6668 , expected
@@ -75,7 +77,7 @@ test('iterates anyOfs and converts types', function(assert) {
7577 required : [ 'foo' ] ,
7678 properties : {
7779 foo : {
78- type : 'long '
80+ type : 'integer '
7981 }
8082 }
8183 } ,
@@ -85,7 +87,7 @@ test('iterates anyOfs and converts types', function(assert) {
8587 type : 'object' ,
8688 properties : {
8789 bar : {
88- type : 'double '
90+ type : 'number '
8991 }
9092 }
9193 }
@@ -105,7 +107,6 @@ test('iterates anyOfs and converts types', function(assert) {
105107 properties : {
106108 foo : {
107109 type : 'integer' ,
108- format : 'int64'
109110 }
110111 }
111112 } ,
@@ -116,7 +117,6 @@ test('iterates anyOfs and converts types', function(assert) {
116117 properties : {
117118 bar : {
118119 type : 'number' ,
119- format : 'double'
120120 }
121121 }
122122 }
@@ -128,7 +128,7 @@ test('iterates anyOfs and converts types', function(assert) {
128128 assert . deepEqual ( result , expected , 'anyOfs iterated' ) ;
129129} ) ;
130130
131- test ( 'iterates oneOfs and converts types ' , function ( assert ) {
131+ test ( 'iterates oneOfs' , function ( assert ) {
132132 var schema
133133 , result
134134 , expected
@@ -143,7 +143,7 @@ test('iterates oneOfs and converts types', function(assert) {
143143 required : [ 'foo' ] ,
144144 properties : {
145145 foo : {
146- type : 'long '
146+ type : 'integer '
147147 }
148148 }
149149 } ,
@@ -153,7 +153,7 @@ test('iterates oneOfs and converts types', function(assert) {
153153 type : 'object' ,
154154 properties : {
155155 bar : {
156- type : 'double '
156+ type : 'number '
157157 }
158158 }
159159 }
@@ -173,7 +173,6 @@ test('iterates oneOfs and converts types', function(assert) {
173173 properties : {
174174 foo : {
175175 type : 'integer' ,
176- format : 'int64'
177176 }
178177 }
179178 } ,
@@ -184,7 +183,6 @@ test('iterates oneOfs and converts types', function(assert) {
184183 properties : {
185184 bar : {
186185 type : 'number' ,
187- format : 'double'
188186 }
189187 }
190188 }
@@ -208,7 +206,8 @@ test('converts types in not', function(assert) {
208206 type : 'object' ,
209207 properties : {
210208 not : {
211- type : 'password' ,
209+ type : 'string' ,
210+ format : 'password' ,
212211 minLength : 8
213212 }
214213 }
@@ -241,7 +240,8 @@ test('converts types in not', function(assert) {
241240
242241 schema = {
243242 not : {
244- type : 'password' ,
243+ type : 'string' ,
244+ format : 'password' ,
245245 minLength : 8
246246 }
247247 } ;
0 commit comments