summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-timestamp-parsing-error.js
Commit message (Collapse)AuthorAgeFilesLines
* errors: convert 'fs'matzavinos2017-08-311-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | covert lib/fs.js over to using lib/internal/errors.js i have not addressed the cases that use errnoException(), for reasons described in GH-12926 - throw the ERR_INVALID_CALLBACK error when the the callback is invalid - replace the ['object', 'string'] with ['string', 'object'] in the error constructor call, to better match the previous err msg in the getOptions() function - add error ERR_VALUE_OUT_OF_RANGE in lib/internal/errors.js, this error is thrown when a numeric value is out of range - document the ERR_VALUE_OUT_OF_RANGE err in errors.md - correct the expected args, in the error thrown in the function fs._toUnixTimestamp() to ['Date', 'time in seconds'] (lib/fs.js) - update the listener error type in the fs.watchFile() function, from Error to TypeError (lib/fs.js) - update errors from ERR_INVALID_OPT_VALUE to ERR_INVALID_ARG_TYPE in the functions fs.ReadStream() and fs.WriteStream(), for the cases of range errors use the new error: ERR_VALUE_OUT_OF_RANGE (lib/fs.js) PR-URL: https://github.com/nodejs/node/pull/15043 Refs: https://github.com/nodejs/node/issues/11273 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* test: reduce string concatenationsVse Mozhet Byt2017-05-051-1/+1
| | | | | | | 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>
* fs: (+/-)Infinity and NaN invalid unixtimestampLuca Maraschi2017-03-211-3/+4
| | | | | | | | | | | | Infinity and NaN are currently considered valid input when generating a unix time stamp but are defaulted arbitrarly to Date.now()/1000. This PR removes this behaviour and throw an exception like all the other invalid input types. PR-URL: https://github.com/nodejs/node/pull/11919 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: add tests for unixtimestamp generationLuca Maraschi2017-03-201-0/+16
This test checks for the different input types for the generation of UNIX timestamps in the fs module. PR-URL: https://github.com/nodejs/node/pull/11886 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>