| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -145,7 +145,7 @@ assert.throws( | |||
| 145 | 145 | ||
| 146 | 146 | assert.throws( | |
| 147 | 147 | () => { | |
| 148 | - fs.access(__filename, fs.F_OK, {}); | ||
| 148 | + fs.access(__filename, fs.F_OK, common.mustNotMutateObjectDeep({})); | ||
| 149 | 149 | }, | |
| 150 | 150 | { | |
| 151 | 151 | code: 'ERR_INVALID_ARG_TYPE', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,17 +71,17 @@ const fileData3 = fs.readFileSync(filename3); | |||
| 71 | 71 | assert.strictEqual(buf.length + currentFileData.length, fileData3.length); | |
| 72 | 72 | ||
| 73 | 73 | const filename4 = join(tmpdir.path, 'append-sync4.txt'); | |
| 74 | - fs.writeFileSync(filename4, currentFileData, { mode: m }); | ||
| 74 | + fs.writeFileSync(filename4, currentFileData, common.mustNotMutateObjectDeep({ mode: m })); | ||
| 75 | 75 | ||
| 76 | 76 | [ | |
| 77 | 77 | true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null, | |
| 78 | 78 | ].forEach((value) => { | |
| 79 | 79 | assert.throws( | |
| 80 | - () => fs.appendFileSync(filename4, value, { mode: m }), | ||
| 80 | + () => fs.appendFileSync(filename4, value, common.mustNotMutateObjectDeep({ mode: m })), | ||
| 81 | 81 | { message: /data/, code: 'ERR_INVALID_ARG_TYPE' } | |
| 82 | 82 | ); | |
| 83 | 83 | }); | |
| 84 | - fs.appendFileSync(filename4, `${num}`, { mode: m }); | ||
| 84 | + fs.appendFileSync(filename4, `${num}`, common.mustNotMutateObjectDeep({ mode: m })); | ||
| 85 | 85 | ||
| 86 | 86 | // Windows permissions aren't Unix. | |
| 87 | 87 | if (!common.isWindows) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments