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 <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
davisjam authored and MylesBorins committed Jan 22, 2018
1 parent 337d93a commit aada57b
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 aada57b

Please sign in to comment.