| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e9080a9 commit a98102a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,27 +66,27 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; | |||
| 66 | 66 | { | |
| 67 | 67 | const fd = fs.openSync(filename, 'r'); | |
| 68 | 68 | ||
| 69 | - wrongInputs.forEach((wrongInput) => { | ||
| 69 | + for (const wrongInput of wrongInputs) { | ||
| 70 | 70 | assert.throws( | |
| 71 | 71 | () => fs.readvSync(fd, wrongInput, null), { | |
| 72 | 72 | code: 'ERR_INVALID_ARG_TYPE', | |
| 73 | 73 | name: 'TypeError' | |
| 74 | 74 | } | |
| 75 | 75 | ); | |
| 76 | - }); | ||
| 76 | + } | ||
| 77 | 77 | ||
| 78 | 78 | fs.closeSync(fd); | |
| 79 | 79 | } | |
| 80 | 80 | ||
| 81 | 81 | { | |
| 82 | 82 | // fs.readv with wrong fd argument | |
| 83 | - wrongInputs.forEach((wrongInput) => { | ||
| 83 | + for (const wrongInput of wrongInputs) { | ||
| 84 | 84 | assert.throws( | |
| 85 | 85 | () => fs.readvSync(wrongInput), | |
| 86 | 86 | { | |
| 87 | 87 | code: 'ERR_INVALID_ARG_TYPE', | |
| 88 | 88 | name: 'TypeError' | |
| 89 | 89 | } | |
| 90 | 90 | ); | |
| 91 | - }); | ||
| 91 | + } | ||
| 92 | 92 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,28 +67,27 @@ const wrongInputs = [false, 'test', {}, [{}], ['sdf'], null, undefined]; | |||
| 67 | 67 | fs.writeFileSync(filename, exptectedBuff); | |
| 68 | 68 | const fd = fs.openSync(filename, 'r'); | |
| 69 | 69 | ||
| 70 | - | ||
| 71 | - wrongInputs.forEach((wrongInput) => { | ||
| 70 | + for (const wrongInput of wrongInputs) { | ||
| 72 | 71 | assert.throws( | |
| 73 | 72 | () => fs.readv(fd, wrongInput, null, common.mustNotCall()), { | |
| 74 | 73 | code: 'ERR_INVALID_ARG_TYPE', | |
| 75 | 74 | name: 'TypeError' | |
| 76 | 75 | } | |
| 77 | 76 | ); | |
| 78 | - }); | ||
| 77 | + } | ||
| 79 | 78 | ||
| 80 | 79 | fs.closeSync(fd); | |
| 81 | 80 | } | |
| 82 | 81 | ||
| 83 | 82 | { | |
| 84 | 83 | // fs.readv with wrong fd argument | |
| 85 | - wrongInputs.forEach((wrongInput) => { | ||
| 84 | + for (const wrongInput of wrongInputs) { | ||
| 86 | 85 | assert.throws( | |
| 87 | 86 | () => fs.readv(wrongInput, common.mustNotCall()), | |
| 88 | 87 | { | |
| 89 | 88 | code: 'ERR_INVALID_ARG_TYPE', | |
| 90 | 89 | name: 'TypeError' | |
| 91 | 90 | } | |
| 92 | 91 | ); | |
| 93 | - }); | ||
| 92 | + } | ||
| 94 | 93 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments