Skip to content

Commit

Permalink
fix test lakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
ronhippler committed Jul 29, 2018
1 parent b1e809a commit 1ec11d2
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,12 @@ describe("dvb.monitor", () => {

assertMode(transport.mode);

if (transport.line.startsWith("E")) {
assert.isDefined(transport.diva);
if (transport.line) {
assertDiva(transport.diva!);
} else {
if (transport.line) {
assertDiva(transport.diva!);
} else {
assert.isUndefined(transport.diva);
}
assert.isUndefined(transport.diva);
}

assert.isDefined(transport.platform);
assertPlatform(transport.platform!);
}
Expand Down Expand Up @@ -86,14 +82,15 @@ describe("dvb.route", () => {

assertMode(node.mode);

if (node.mode.name !== "Footpath" && node.mode.name !== "StayForConnection") {
if (node.mode.name !== "Footpath" && node.mode.name !== "StayForConnection"
&& node.mode.name.indexOf("Stairs") === -1) {
assert.isDefined(node.diva);
assertDiva(node.diva!);
} else {
assert.isUndefined(node.diva);
}

if (node.mode.name === "Footpath" && !node.departure) {
if (node.mode.name === "Footpath" && !node.departure || node.mode.name.indexOf("Stairs") > -1) {
assert.isUndefined(node.departure);
assert.isUndefined(node.arrival);
assert.isArray(node.stops);
Expand Down

0 comments on commit 1ec11d2

Please sign in to comment.