File tree 2 files changed +399
-400
lines changed 2 files changed +399
-400
lines changed Original file line number Diff line number Diff line change @@ -180,20 +180,18 @@ describe('Schema', () => {
180
180
181
181
it ( 'will fail to create a class if that class was already created by an object' , done => {
182
182
config . database . loadSchema ( )
183
- . then ( schema => {
184
- schema . validateObject ( 'NewClass' , { foo : 7 } )
185
- . then ( ( ) => {
186
- schema . reload ( )
187
- . then ( schema => schema . addClassIfNotExists ( 'NewClass' , {
188
- foo : { type : 'String' }
189
- } ) )
190
- . catch ( error => {
191
- expect ( error . code ) . toEqual ( Parse . Error . INVALID_CLASS_NAME ) ;
192
- expect ( error . message ) . toEqual ( 'Class NewClass already exists.' ) ;
193
- done ( ) ;
194
- } ) ;
183
+ . then ( schema => {
184
+ schema . validateObject ( 'NewClass' , { foo : 7 } )
185
+ . then ( ( ) => schema . reloadData ( ) )
186
+ . then ( ( ) => schema . addClassIfNotExists ( 'NewClass' , {
187
+ foo : { type : 'String' }
188
+ } ) )
189
+ . catch ( error => {
190
+ expect ( error . code ) . toEqual ( Parse . Error . INVALID_CLASS_NAME ) ;
191
+ expect ( error . message ) . toEqual ( 'Class NewClass already exists.' ) ;
192
+ done ( ) ;
193
+ } ) ;
195
194
} ) ;
196
- } )
197
195
} ) ;
198
196
199
197
it ( 'will resolve class creation races appropriately' , done => {
You can’t perform that action at this time.
0 commit comments