summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-append-file.js
AgeCommit message (Collapse)Author
2019-03-10benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-17doc,lib,test: capitalize comment sentencesRuben Bridgewater
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-10tools: capitalize sentencesRuben Bridgewater
This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-06-06test: apply promises API to fourth appendFile testRich Trott
Add tests for `fs.promises.appendFile()` to the last test case in `test-fs-access`. (The previous test cases already have promises API versions.) PR-URL: https://github.com/nodejs/node/pull/21131 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-06test: apply promises API to fourth appendFile testRich Trott
Add tests for `fs.promises.appendFile()` to the fourth (of five) test case in `test-fs-access`. (The previous test cases already have promises API versions.) PR-URL: https://github.com/nodejs/node/pull/21131 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-06test: apply promises API to third appendFile testRich Trott
Add tests for `fs.promises.appendFile()` to the third (of five) test case in `test-fs-access`. (First and second test cases already have promises API versions.) PR-URL: https://github.com/nodejs/node/pull/21131 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22test: add promise API test for appendFile()Rich Trott
Apply the second of five test cases in test-fs-append-fil to the promise-based API in addition to the callback-based API. PR-URL: https://github.com/nodejs/node/pull/20842 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-05-16test: add promise API test for appendFile()Rich Trott
Apply the first of five test cases in test-fs-append-file to the promise-based API in addition to the callback-based API. PR-URL: https://github.com/nodejs/node/pull/20739 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-26Revert "fs: Revert throw on invalid callbacks"Ruben Bridgewater
This reverts commit 8250bfd1e5188d5dada58aedf7a991e959d5eaa9. PR-URL: https://github.com/nodejs/node/pull/18668 Refs: https://github.com/nodejs/node/pull/12562 Refs: https://github.com/nodejs/node/pull/12976 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-01-31test: move tmpdir to submodule of commonRich Trott
Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-06-10fs: don't conflate data and callback in appendFileNikolai Vavilov
PR-URL: https://github.com/nodejs/node/pull/11607 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-05test: reduce string concatenationsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/12735 Refs: https://github.com/nodejs/node/pull/12455 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
2016-12-04test: refactor test-fs-append-file.jsadelmann
- Replaced var with either const or let. - Replaced assert.equal() with assert.strictEqual(). - Replaced all error checks with assert.ifError(e). PR-URL: https://github.com/nodejs/node/pull/10110 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-03-16buffer: add .from(), .alloc() and .allocUnsafe()James M Snell
Several changes: * Soft-Deprecate Buffer() constructors * Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()` * Add `--zero-fill-buffers` command line option * Add byteOffset and length to `new Buffer(arrayBuffer)` constructor * buffer.fill('') previously had no effect, now zero-fills * Update the docs PR-URL: https://github.com/nodejs/node/pull/4682 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-10-16fs: add file descriptor support to *File() funcsJohannes Wüller
These changes affect the following functions and their synchronous counterparts: * fs.readFile() * fs.writeFile() * fs.appendFile() If the first parameter is a uint32, it is treated as a file descriptor. In all other cases, the original implementation is used to ensure backwards compatibility. File descriptor ownership is never taken from the user. The documentation was adjusted to reflect these API changes. A note was added to make the user aware of file descriptor ownership and the conditions under which a file descriptor can be used by each of these functions. Tests were extended to test for file descriptor parameters under the conditions noted in the relevant documentation. PR-URL: https://github.com/nodejs/node/pull/3163 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-10-07test: remove deprecated error loggingRich Trott
common.error() is just deprecated util.error() renamed. Remove calls to it and some other extraneous console logging in tests. PR-URL: https://github.com/nodejs/node/pull/3079 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-31test: use common.isWindows consistentlySakthipriyan Vairamani
In the tests, we use "process.platform === 'win32'" in some places. This patch replaces them with the "common.isWindows" for consistency. PR-URL: https://github.com/nodejs/io.js/pull/2269 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-13test: only refresh tmpDir for tests that need itRich Trott
Expose `common.refreshTmpDir()` and only call it for tests that use common.tmpDir or common.PIPE. A positive side effect is the removal of a code smell where child processes were detected by the presence of `.send()`. Now each process can decide for itself if it needs to refresh tmpDir. PR-URL: https://github.com/nodejs/io.js/pull/1954 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-05-19test: enable linting for testsRoman Reiss
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-12Remove excessive copyright/license boilerplateisaacs
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
2014-12-17test: split test in parallel/sequentialFedor Indutny
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139