test: add test description to fs.readFile tests

PR-URL: https://github.com/nodejs/node/pull/17610
Refs: https://github.com/nodejs/node/pull/17054#discussion_r155406755
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>
This commit is contained in:
Jamie Davis 2017-12-07 12:44:42 -05:00 committed by Ruben Bridgewater
parent 8d5b3de8cb
commit dd2200ecf8
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
5 changed files with 15 additions and 0 deletions

View File

@ -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');

View File

@ -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)

View File

@ -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');

View File

@ -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');

View File

@ -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');