| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b6355ef commit 93d7fa3
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -131,11 +131,12 @@ joinTests.forEach((test) => { | |||
| 131 | 131 | } else { | |
| 132 | 132 | os = 'posix'; | |
| 133 | 133 | } | |
| 134 | - const message = | ||
| 135 | - `path.${os}.join(${test[0].map(JSON.stringify).join(',')})\n expect=${ | ||
| 134 | + if (actual !== expected && actualAlt !== expected) { | ||
| 135 | + const delimiter = test[0].map(JSON.stringify).join(','); | ||
| 136 | + const message = `path.${os}.join(${delimiter})\n expect=${ | ||
| 136 | 137 | JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; | |
| 137 | - if (actual !== expected && actualAlt !== expected) | ||
| 138 | 138 | failures.push(`\n${message}`); | |
| 139 | + } | ||
| 139 | 140 | }); | |
| 140 | 141 | }); | |
| 141 | 142 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,12 +56,13 @@ relativeTests.forEach((test) => { | |||
| 56 | 56 | test[1].forEach((test) => { | |
| 57 | 57 | const actual = relative(test[0], test[1]); | |
| 58 | 58 | const expected = test[2]; | |
| 59 | - const os = relative === path.win32.relative ? 'win32' : 'posix'; | ||
| 60 | - const message = `path.${os}.relative(${ | ||
| 61 | - test.slice(0, 2).map(JSON.stringify).join(',')})\n expect=${ | ||
| 62 | - JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; | ||
| 63 | - if (actual !== expected) | ||
| 59 | + if (actual !== expected) { | ||
| 60 | + const os = relative === path.win32.relative ? 'win32' : 'posix'; | ||
| 61 | + const message = `path.${os}.relative(${ | ||
| 62 | + test.slice(0, 2).map(JSON.stringify).join(',')})\n expect=${ | ||
| 63 | + JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; | ||
| 64 | 64 | failures.push(`\n${message}`); | |
| 65 | + } | ||
| 65 | 66 | }); | |
| 66 | 67 | }); | |
| 67 | 68 | assert.strictEqual(failures.length, 0, failures.join('')); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments