Commit Graph

718 Commits

Author SHA1 Message Date
VictorKubrak a447b2dd45 rename() should be able to rename an existing file to the same filename (#502)
* rename should not change name to itself

* new test expects failure

* should rename an existing file to itself

* should rename an existing file to itself

* Update tests/spec/fs.rename.spec.js

* add .skip to the test
2018-10-16 09:43:44 -04:00
AHKol 8aa8dda4d6 Fix #411: Tests if event is thrown when calling rename (#478)
* Fix #411: Tests if event is thrown when calling rename

* npm run lint:fix

* Added comment explaining lack of 'rename' event check
2018-10-15 16:33:47 -04:00
Janice 41510e7da4 Fix issue 529 (#530)
* Fix issue 529

* Fix Issue 529

* Fix issue 529 and some indentations

* fix arrow function instead of function expression

* Fix issue529

* Fix issue529

* Saving files before refreshing line endings

* done

* push again

* change sth

* changed
2018-10-09 21:17:25 -04:00
jrkong b1c4f04f83 Removed outdated about permission functions in README.md (#513) 2018-10-09 20:53:32 -04:00
pynnl c33f22b464 Issue 396 - Add a test for fs.promises.stat() when the path does not exist (#406)
* test non exist path for promise

* fix new line at the end

* fix missing semicolon 113:26

* follow 'Testing promise codes' on guidline
2018-10-09 17:40:35 -04:00
Julia McGeoghan 389dedd3c0 Fix #421 - Add test for fs.promises.link to ensure it returns a Promise (#462)
* Add test

* Move location of describe block

* Remove comment

* Have test check returnValue and not obj

* Override package-lock.json with one from master branch

* Improve naming of fsPromise variable to be more clear
2018-10-09 17:35:28 -04:00
yuzhouChen 8504cc7e2a Issue497 Add test for fs.chmod when the path is invalid (#525)
* Fix #497 Add test for fs.chmod when the path is invalid

* Fix #497 All test passed
2018-10-09 17:30:36 -04:00
yevseytsev 27659d45da 491 (#501)
* mkdir - restricted symbols('?' only)

* FINAL
2018-10-09 17:28:14 -04:00
Stephen Truong 934ef8bfa7 Fix #419: Add test for fsPromises.open() when the path does not exist (#455)
* Fix #419: Add test for fsPromises.open() when the path does not exist

* Update package.json

* Fix #419: Add test for fsPromises.open() when the path does not exist

Removed some unnecessary code based on reviews

* Update fs.open.spec.js
2018-10-09 16:00:56 -04:00
Ruihui Yan c7ea45a18b Fix issue #475 - Add test for fs.exits() when resulting path of a symbolic link is not found (#519)
* add test for exits when resulting path of a symbolic link is not found

* fixed style nit
2018-10-09 14:31:15 -04:00
Sean 009821290f Fixes #499: Update functionality for fs.truncate (#533)
* Fixes #499: Update functionality for fs.truncate

This change to fs.truncate()'s functionality throws an error when the
length to truncate by is a non-numeric string.

* Refactor numeric type validation

As node implements a helper function to validate numeric values, let's
replicate the same logic to use throughout Filer.
2018-10-09 13:53:26 -04:00
Thanh Nguyen 2f3c384868 Add test for fsPromises.rmdir() when dir not empty and dir is a file, Fix Issue 474 (#510)
* Saving files before refreshing line endings

* Adding test case for returning an error if the path is not a directory

* Add return for fsPromises, and few other small fixes

* Fix promises, and few done parameter

* Update fs.rmdir.spec.js
2018-10-09 13:51:19 -04:00
giantpanpan beea03dbae Add test for fs.writeFile-readFile.spec to write a file in non-existing path (#486) 2018-10-09 13:48:51 -04:00
ywpark1 3e0da99040 Fix issue-426: Add the test for fsPromises.readdir when the path exists, and is a directory (#452) 2018-10-09 13:32:09 -04:00
dleung25 02bd6d8a62 Issue#518 fix: Add test for fsPromises.unlink() should be a function (#526)
* issue518 fix

* changed back to original package.json

* add newline to end of file
2018-10-09 13:27:22 -04:00
Jeffrey Espiritu 7e27c8be2c Fix Issue #400 - add test for passing file to fs.promise.readdir() (#409)
* Fix Issue #400 - add test for passing file to fs.promise.readdir()

This adds a test to ensure that `fs.promise.readdir()` throws an error when passing in a file.

* Made changes to `fsPromises.readdir` to be more promise-friendly
2018-10-09 13:04:19 -04:00
Casva e77361107e Issue 427 - Add tests to fsPromises.rmdir when directory doesn't exist and when trying to delete root directory (#457)
* Fix #427 - Fixed indentation and ENOENT -> EBUSY on line 120

* Deleted extra line at the end of document

* Fix #427 - Added tests for fsPromises.rmdir when trying to remove a nonexistent directory and when trying to remove root directory
2018-10-09 13:02:01 -04:00
Daniel Bogomazov 87230ce1e3 Fix #405 - Added tests for chmod and fchmod using Promises (#458)
* Added tests for chmod and fchmod using Promises

* Remove unrelated files from pull request

* Fixed spelling mistake

* Removed redundant catch blocks
2018-10-09 12:59:17 -04:00
Huda Al Dallal 2e2e2f9d64 Fixed issue#480 using promises to test fs.truncate when path does not exist (#516)
* added a test for issue#480 using promises to test fs.truncate

* Fixed issue#480 tesing fs.truncate using promises when path does not exist
2018-10-09 12:56:20 -04:00
rdittrich97 0354c7e13e Fix #423: added proimse support for fs.stat (#432)
* added promise support to fs.stat

* restored package lock

* fixed lint issues

* made tests more promise freindly

* removed .catch statement from promise and fixed style issues

* removed .catch statement from promise and fixed style issues
2018-10-09 12:54:40 -04:00
y2s82 1156f420c4 Fixed #424 - implement fs.promises.read tests (#429)
* implemented first two tests of fs.promises.read

* simplified the 2nd fs.promises.read test

* implemented test on file position update for fs.promises.read

* implemented directory read failure test for fs.promises.read

* implemented test to check the return type to be a Promise in fs.promises.read

* fixed indentation and also fixed a catch statement to allow all code to be reachable

* made tests more promise-friendly

* applied some style changes and test changes as per @rdittrich97 suggestions

* removed lines that are unnecessary for promise-based testing and syntactically simplified some function definitions

* removed more unnecessary check lines in directory check fail test
2018-10-09 12:51:59 -04:00
Nick Skuybeda 86b6b2a907 Fixed Issue #483 for a test done for fs.mknod promise (#509)
* test done for fs.mknod promise

* fixing whitespaces
2018-10-09 12:43:45 -04:00
Chaya Danzinger a8759b1e38 Add tests for fs.promises utimes function #527 (#540)
* first two promise tests initial commit

* implemented existing tests but with promises

* add final tests

* add return statement for remaining tests

* fix function call error
2018-10-09 12:39:18 -04:00
David Humphrey c84dd14f5e
Merge pull request #395 from humphd/issue-393
Fix #393: add test for truncate with length undefined
2018-10-03 18:13:08 -04:00
Corey James e3a1187ef9 Fixed the fs.read() example in doc. The error checking statements were using the wrong variable name (#449) 2018-09-24 14:08:49 -04:00
David Humphrey (:humph) david.humphrey@senecacollege.ca 5e4de6b698 Fix #393: add test for truncate with length undefined 2018-09-17 18:30:09 -04:00
0xazure fd3de6be2c Update karma dev dependency
Resolves `npm audit` warnings about 1 low, 5
moderate vulnerabilities related to versions before
karma@3.0.0.

Closes #384.
2018-09-12 21:43:58 -04:00
Dmytro 353290a08f Adding support for promises. Closes #379, #382 (#380)
* adding promise-based filedescriptor

* fixing promisify dep

* promisifying shell

* deprecating 'exists' method on fs

* adding docs

* fixing docs

* removing redundant code.
2018-08-27 19:50:41 -04:00
Alan K de45918cbc
Merge pull request #378 from humphd/karma
Automate tests using Headless Chrome + Karma runner
2018-08-21 14:54:48 -04:00
David Humphrey 53f5b0c50b Fix script names in package.json 2018-07-27 11:23:27 -04:00
David Humphrey 7798b1cb87 Fix lint issues in implementation.js 2018-07-27 11:23:06 -04:00
David Humphrey 0da0e60194 Fix lint issues in interface.js 2018-07-27 11:17:45 -04:00
David Humphrey dc8fa4cb96 Fix lint issues in node.js 2018-07-27 11:17:03 -04:00
David Humphrey 3a44c1756a Fix lint issues in src/path.js 2018-07-27 11:16:30 -04:00
David Humphrey 8d553b78e0 Fix lint issues in indexeddb.js provider 2018-07-27 11:14:08 -04:00
David Humphrey b92151cdc5 Fix lint issues in websql.js provider 2018-07-27 11:13:40 -04:00
David Humphrey bcf4d9834a Don't build source map for karma test bundle 2018-07-27 11:12:25 -04:00
David Humphrey ed11b01234 Fix lint issues in shell.js 2018-07-27 11:12:06 -04:00
David Humphrey 0980ec4608 Fix lint issues in issue258.js 2018-07-27 11:09:45 -04:00
David Humphrey a31044cc8d Fix lint issues in issue267.js 2018-07-27 11:08:40 -04:00
David Humphrey 454d5bc801 Fix lint issues in ls-depth-bug.js 2018-07-27 11:07:17 -04:00
David Humphrey d41885e9d0 Fix lint issue in tests/lib/indexeddb.js 2018-07-27 11:03:43 -04:00
David Humphrey 0e00af661a Fix lint issues in fs.appendFile.spec.js 2018-07-27 11:02:42 -04:00
David Humphrey f89b616fdc Fix issues in fs.chmod.spec.js 2018-07-27 11:01:47 -04:00
David Humphrey cbcddee3be Fix lint issues in fs.chown.spec.js 2018-07-27 11:01:26 -04:00
David Humphrey 1a738dd2bb Fix lint issues in fs.close.spec.js, fs.link.spec.js 2018-07-27 11:00:48 -04:00
David Humphrey 9e08d96c96 Fix lint issues in fs.lstat.spec.js 2018-07-27 10:44:42 -04:00
David Humphrey 980d5d0917 Fix lint issues in fs.lseek.spec.js 2018-07-27 10:43:51 -04:00
David Humphrey a8e373e4b9 Fix lint issues in fs.mknod.spec.js 2018-07-27 10:39:34 -04:00
David Humphrey 86e57d60db Fix lint issues in fs.open.spec.js 2018-07-27 10:38:44 -04:00