Skip to content

Commit

Permalink
test: add test description to fs.readFile tests
Browse files Browse the repository at this point in the history
PR-URL: #17610
Refs: #17054 (comment)
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
davisjam authored and MylesBorins committed Dec 21, 2017
1 parent 70588f7 commit bc7dc65
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-fs-readfile-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

'use strict';
require('../common');

// Trivial test of fs.readFile on an empty file.

const assert = require('assert');
const fs = require('fs');
const fixtures = require('../common/fixtures');
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-fs-readfile-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

'use strict';
const common = require('../common');

// Test that fs.readFile fails correctly on a non-existent file.

// `fs.readFile('/')` does not fail on FreeBSD, because you can open and read
// the directory there.
if (common.isFreeBSD)
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-fs-readfile-fd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict';
require('../common');

// Test fs.readFile using a file descriptor.

const fixtures = require('../common/fixtures');
const assert = require('assert');
const fs = require('fs');
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-fs-readfile-unlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

'use strict';
const common = require('../common');

// Test that unlink succeeds immediately after readFile completes.

const assert = require('assert');
const fs = require('fs');
const path = require('path');
Expand Down
3 changes: 3 additions & 0 deletions test/parallel/test-fs-readfile-zero-byte-liar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

'use strict';
const common = require('../common');

// Test that readFile works even when stat returns size 0.

const assert = require('assert');
const fs = require('fs');

Expand Down

0 comments on commit bc7dc65

Please sign in to comment.