| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,6 +31,14 @@ function closeEnough(actual, expected, margin) { | |||
| 31 | 31 | if (process.arch === 'ppc64') { | |
| 32 | 32 | margin += 1000; | |
| 33 | 33 | } | |
| 34 | + | ||
| 35 | + // Filesystems without support for timestamps before 1970-01-01, such as NFSv3, | ||
| 36 | + // should return 0 for negative numbers. Do not treat it as error. | ||
| 37 | + if (actual === 0 && expected < 0) { | ||
| 38 | + console.log(`ignored 0 while expecting ${expected}`); | ||
| 39 | + return; | ||
| 40 | + } | ||
| 41 | + | ||
| 34 | 42 | assert.ok(Math.abs(Number(actual - expected)) < margin, | |
| 35 | 43 | `expected ${expected} ± ${margin}, got ${actual}`); | |
| 36 | 44 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments