GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: use `common.mustNotMutateObjectDeep()` in fs tests · nodejs/node@61cd11a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-fs-access.js
    • test-fs-append-file-sync.js
    • test-fs-cp.mjs
    • test-fs-mkdir.js
    • test-fs-opendir.js
    • test-fs-promises-file-handle-readFile.js
    • test-fs-promises-write-optional-params.js
    • test-fs-read-optional-params.js
    • test-fs-read-position-validation.mjs
    • test-fs-read-promises-optional-params.js
    • test-fs-read-stream.js
    • test-fs-readSync-optional-params.js
    • test-fs-readSync-position-validation.mjs
    • test-fs-readfile-flags.js
    • test-fs-rm.js
    • test-fs-stat-bigint.js
    • test-fs-stream-options.js
    • test-fs-write-optional-params.js
    • test-fs-write-sync-optional-params.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-fs-access.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-access.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ assert.throws(
145145

146146
assert.throws(
147147
() => {
148-
fs.access(__filename, fs.F_OK, {});
148+
fs.access(__filename, fs.F_OK, common.mustNotMutateObjectDeep({}));
149149
},
150150
{
151151
code: 'ERR_INVALID_ARG_TYPE',
Collapse file

‎test/parallel/test-fs-append-file-sync.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-append-file-sync.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ const fileData3 = fs.readFileSync(filename3);
7171
assert.strictEqual(buf.length + currentFileData.length, fileData3.length);
7272

7373
const filename4 = join(tmpdir.path, 'append-sync4.txt');
74-
fs.writeFileSync(filename4, currentFileData, { mode: m });
74+
fs.writeFileSync(filename4, currentFileData, common.mustNotMutateObjectDeep({ mode: m }));
7575

7676
[
7777
true, false, 0, 1, Infinity, () => {}, {}, [], undefined, null,
7878
].forEach((value) => {
7979
assert.throws(
80-
() => fs.appendFileSync(filename4, value, { mode: m }),
80+
() => fs.appendFileSync(filename4, value, common.mustNotMutateObjectDeep({ mode: m })),
8181
{ message: /data/, code: 'ERR_INVALID_ARG_TYPE' }
8282
);
8383
});
84-
fs.appendFileSync(filename4, `${num}`, { mode: m });
84+
fs.appendFileSync(filename4, `${num}`, common.mustNotMutateObjectDeep({ mode: m }));
8585

8686
// Windows permissions aren't Unix.
8787
if (!common.isWindows) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.