-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix - Wasstarting mock server when testing real device
the enviroment vars HOSTNAME, PORT, USERNAME, PASSWORD are used to point the mocha tests at a real device. However bugs had snuck in and when testing with a real device we were still starting the Mock Server. So, only start the MockServer when there is no HOSTNAME et. Also required mocha to be bumped for the mocha.opts file and --exclude so mocha did not try and test (and run) the mockserver. I just chose mocha 6, no real reason other than I know it has --exclude in mocha.opts
- Loading branch information
1 parent
6a3afb9
commit 9a56edc
Showing
7 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--exclude serverMockup.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
serverMockup = require('./serverMockup') | ||
synthTest = not process.env.HOSTNAME | ||
|
||
serverMockup = require('./serverMockup') if synthTest | ||
|
||
describe 'Terminating', () -> | ||
it 'should terminate serverMockup', (done) -> | ||
serverMockup.close() | ||
done() | ||
if synthTest | ||
it 'should terminate serverMockup', (done) -> | ||
serverMockup.close() | ||
done() |