Skip to content
Permalink
Browse files
Add failing test for handling failed server launch
  • Loading branch information
raphinesse committed Sep 8, 2018
1 parent 9f6fadd commit f41b829d431ab396ada445b9654ff126b1db5c80
Showing 1 changed file with 10 additions and 0 deletions.
@@ -149,6 +149,16 @@ describe('cordova/serve', () => {
err => expect(err).toBe(fakeError)
);
}, 100);

it('should fail if launching the server fails', () => {
const fakeError = new Error();
serverSpy.launchServer.and.returnValue(Promise.reject(fakeError));

return privateServe(1234567, {}).then(
_ => fail('Expected promise to be rejected'),
err => expect(err).toBe(fakeError)
);
}, 100);
});

describe('registerRoutes', () => {

0 comments on commit f41b829

Please sign in to comment.