mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Fix test failures on Windows
Fix broken regex, too tight time check, and lack of shell expansion on Windows causing test cases to fail or not run at all.
This commit is contained in:
1 parent
01e442c42e
commit
09c3f82226
5 files changed
+23
-19
No files matched your search
+2
-1
@@ -23,7 +23,8 @@ describe("lib/helpers", function() {
|
||||
await libHelpers.wait(100);
|
||||
let duration = Number(hrtime() - startNs) / 1e6;
|
||||
|
||||
assert(duration > 90 && duration < 110, `duration waited (${duration}ms) 10% of expected (100ms)`);
|
||||
// On windows the time waited is normally up to 15 ms late with outliers in the 20ms range.
|
||||
assert(duration > 90 && duration < 130, `duration (${duration}ms) not within (90-130)`);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user