Skip to content

Commit 0c2fa9c

Browse files
authored
test: delay hit till listener registered (#19)
* test: delay hit till listener registered * Update HitLimitTest.js
1 parent c401f56 commit 0c2fa9c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/HitLimitTest.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ module.exports = function () {
1414
"line": TestUtils.getLineLabelNumber("done")
1515
}, null, 1).then(function (res) {
1616
assert.equal(res.status, 200);
17-
hitLimit(); //trigger breakpoint
17+
//trigger breakpoint (after listener is registered)
18+
setTimeout(() => hitLimit(), 500);
1819
}).catch(function (err) {
1920
assert.fail(err)
2021
});
2122
});
2223

2324
it('verify breakpoint removed', async function () {
24-
this.timeout(4000)
25+
this.timeout(2000)
2526
let event = await TestUtils.awaitMarkerEvent("BREAKPOINT_REMOVED");
2627
assert.notEqual(event, null);
2728
});
28-
};
29+
};

0 commit comments

Comments
 (0)