| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0d040a3 commit a589de0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -148,13 +148,11 @@ const trailingTests = [ | |||
| 148 | 148 | ], | |
| 149 | 149 | ]; | |
| 150 | 150 | const failures = []; | |
| 151 | - trailingTests.forEach((test) => { | ||
| 152 | - const parse = test[0]; | ||
| 151 | + for (const [parse, testList] of trailingTests) { | ||
| 153 | 152 | const os = parse === path.win32.parse ? 'win32' : 'posix'; | |
| 154 | - test[1].forEach((test) => { | ||
| 155 | - const actual = parse(test[0]); | ||
| 156 | - const expected = test[1]; | ||
| 157 | - const message = `path.${os}.parse(${JSON.stringify(test[0])})\n expect=${ | ||
| 153 | + for (const [input, expected] of testList) { | ||
| 154 | + const actual = parse(input); | ||
| 155 | + const message = `path.${os}.parse(${JSON.stringify(input)})\n expect=${ | ||
| 158 | 156 | JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; | |
| 159 | 157 | const actualKeys = Object.keys(actual); | |
| 160 | 158 | const expectedKeys = Object.keys(expected); | |
@@ -170,8 +168,8 @@ trailingTests.forEach((test) => { | |||
| 170 | 168 | } | |
| 171 | 169 | if (failed) | |
| 172 | 170 | failures.push(`\n${message}`); | |
| 173 | - }); | ||
| 174 | - }); | ||
| 171 | + } | ||
| 172 | + } | ||
| 175 | 173 | assert.strictEqual(failures.length, 0, failures.join('')); | |
| 176 | 174 | ||
| 177 | 175 | function checkErrors(path) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments