File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ describe('ParseServer', () => {
4
4
it ( 'can reconfigure server' , async ( ) => {
5
5
let parseServer = await reconfigureServer ( { serverURL : 'www.google.com' } ) ;
6
6
expect ( parseServer . config . serverURL ) . toBe ( 'www.google.com' ) ;
7
+
7
8
await shutdownServer ( parseServer ) ;
9
+
8
10
parseServer = await reconfigureServer ( ) ;
9
11
expect ( parseServer . config . serverURL ) . toBe ( 'http://localhost:1337/parse' ) ;
10
12
} ) ;
@@ -15,14 +17,16 @@ describe('ParseServer', () => {
15
17
parseServer . server . on ( 'close' , ( ) => {
16
18
close += 1 ;
17
19
} ) ;
18
- const object = new TestObject ( ) ;
20
+ const object = new TestObject ( { foo : 'bar' } ) ;
19
21
// Open a connection to the server
20
22
const query = new Parse . Query ( TestObject ) ;
21
23
await query . subscribe ( ) ;
22
24
expect ( openConnections . size > 0 ) . toBeTruthy ( ) ;
25
+
23
26
await shutdownServer ( parseServer ) ;
24
27
expect ( close ) . toBe ( 1 ) ;
25
28
expect ( openConnections . size ) . toBe ( 0 ) ;
29
+
26
30
await expectAsync ( object . save ( ) ) . toBeRejectedWithError (
27
31
'XMLHttpRequest failed: "Unable to connect to the Parse API"'
28
32
) ;
You can’t perform that action at this time.
0 commit comments