Commit Graph

426 Commits

Author SHA1 Message Date
Oleksii Polovyi 317cee5636 Fix issue #672 : Refactor "filer/tests/spec/fs.mkdir.spec.js" to follow ES6 syntax with "const/let" instead of "var" (#722)
* Solution for issue-672

* Removed extra 'use strict';
2019-02-05 14:20:48 -05:00
cmchumak 3c51bbb24f Issue-686 - rfs.mkdtemp.spec.js (#717)
* Replaced 'var' with 'const' where applicable

* Issue-686 - replacing 'var' with 'const', added 'use strict' fs.mkdtemp.spec.js

*  Issue-686 - replacing 'var' with 'const', updated 'use strict' fs.mkdtemp.spec.js
2019-02-05 13:58:01 -05:00
Arash N 9d4b264479 Update errors.spec.js (#718)
* Update errors.spec.js

Updating errors.spec.js to use const/let appropriately instead of var.

* Update errors.spec.js

- Changed corrected 'using' to 'use'.
- Changed 'let' to 'const' becuase the're not being changed during the function scope.
2019-02-05 13:51:29 -05:00
Sahib Arora b5e1d9a82b 'Use strict' @top and updated the file with const/let [issue-702] (#726)
* filer.spec.js var changed to const/let

* let changed to const for a local variable, which is constant through out
2019-02-05 13:46:58 -05:00
Jacob Adach da1aad5667 fixes issue #667 (#678)
* fixes issue 667: Update code in tests/some/fs.write.spec.js to use const/let AND strict mode

* fixes issue 667: Update code in tests/some/fs.write.spec.js to use const/let AND strict mode

* changed let to const for variables pointing to required function

* switched a few variable lets to const in file fs.write.spec.js

* switched a few variable lets to const in file fs.write.spec.js

* added package-lock.json file

* changed variables let to const
2019-02-01 20:53:12 -05:00
Violet-XiaoWeiHuang 05057c45d2 Fix ssue #692: Update code in filer/tests/spec/time-flags.spec.js (#696)
* installed npm

* modified time-flags.spec.js

* Update code to use const/let instead of var

* update the variable type from let to const

* add Strict mode

* review fixed
2019-02-01 15:04:15 -05:00
Rachael Scotchmer 4ba9eded4c Fix Issue 684: Replace var with const, let in filer/tests/spec/filer.buffer.spec.js (#697)
* refactored code in tests/spec/filer.buffer.spec.js

* reverted changes to package-lock.json which shouldn't have been changed

* updated package-lock.json

* trying to fix bug

* roll back changes to package-lock.json, change lets to consts in filer.buffer.spec.js, added new line at the end of filer.buffer.spec.js
2019-02-01 12:45:54 -05:00
Woosle Park 8eaaeeed17 Fix issue #681: Updated filer/tests/spec/filer.filesystem.spec.js (#695)
* issue 681 fix

* issue 681 revision

* issue 681 revision v2
2019-01-31 20:23:57 -05:00
DavidLi119 87513997a2 Fixed #708: Added 'use strict' and replaced var with let/const in fs.appendFile.spec.js (#713)
* Add files via upload

* Add files via upload

* Revert "Add files via upload"

This reverts commit 214977d8bf.

* Update fs.appendFile.spec.js

* s

* Revert "s"

This reverts commit 8aa5cbbbd6.

* Changed all `let` to `const`

As informed, all variables will not change at all in this file, therefore all `let` declarations have been changed to `const`
2019-01-31 18:42:50 -05:00
bonbon12 1e660a9d07 Fixed #699 Replacing var with let/const and adding strict mode (#706)
* Updated File to use let/const and strict mode

* Update path-resolution.spec.js

* Updated path-resolution.spec.js

Upon review and further inspection, there was a realization that there was need for the "let" variable as all variable were not modified.
Instead, "const" was used.
2019-01-31 16:42:38 -05:00
Iryna Thompson 3f619fdcb8 Fixed #665: Replaced var with let or const and added strict mode fs.a… (#688)
* Fixed #665: Replaced var with let or const and added strict mode fs.access.spec.js

* Replaced let with const

* Replaced all let with const
2019-01-31 16:08:19 -05:00
Vincent Logozzo 43bba422d9 fixed Issue-689 indexedDB.js (#700)
* CRLF replaced with LF

* package changes to run tests

* updated local varriables to use let and const instead of var

* reverted dependency changes
2019-01-31 15:40:09 -05:00
OlenaVyshnevska fc545ee3c7 code refactoring, added strict mode (#704) 2019-01-31 15:25:57 -05:00
Yuansheng Lu e5481efa9b Fix issue #660: Updated the code to replace var with let, const in strict mode (#694)
* Modify the test file to fix issue-660

* change let to const
2019-01-31 15:11:07 -05:00
Vladimir Rozin 5918cf6ae7 changed fs.watch.spec.js according to filed issue-666 (#680) 2019-01-31 14:12:08 -05:00
jatinkumar 0380a8153c Fixed #667: Replaced var with const and added strict mode in fs.readdir.spec.js (#675)
* Replaced var with either const or let and added strict mode in fs.readdir.spec.js

* Replaced let with const
2019-01-31 14:07:31 -05:00
Nathaniel Ngo 4a39dcc2f0 Fixes Issue#674: Refactored var declarations to const or let declarations to address i… (#676)
* Refactored var declarations to const or let declarations to address issue#674

* refactored let to const when variable does not change values
2019-01-31 14:00:48 -05:00
andrewkoung 4de0bbfafd Fixes #661: replaced var with const (#669)
* replaced var with const for the most part

* Update fs.symlink.spec.js

fixed line 93 and added strict mode
2019-01-31 13:52:39 -05:00
Priyanka Dhiman 7cdef6d963 replaced var with let 2019-01-30 22:27:11 -05:00
David Humphrey 5f10cc2fde Add test API to shim indexedDB when necessary for better coverage 2019-01-03 00:08:22 -05:00
David Humphrey c0acdb97d6 Match node's layout for access modes on fs, with tests 2019-01-02 22:23:58 -05:00
David Humphrey f4ff2e9ed9
Add Filer.fs to support creating a filesystem like node.js (#651)
* Add Filer.fs to support

* Update README code examples, add tests, also expose Path as path
2019-01-02 21:21:25 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca 85a8c21dc1 Support file:// URLs and Buffers for path args, throw when invalid 2019-01-02 19:46:36 -05:00
David Humphrey 1ad81f9bae Remove WebSQL provider (last supported in v0.0.44) 2019-01-02 13:22:51 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca bc861bfd4a Move open files to its own module, properly close fds in tests 2018-12-29 15:11:39 -05:00
David Humphrey 7301024382 Fix #646: add tools/get-filer-version.js to find old Filer versions 2018-12-22 01:02:04 -05:00
David Humphrey d4bfcd71c2 Fix #602: fix mode masking issues, correct X_OK case in fs.access 2018-12-21 23:07:33 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca bfe4385a83 Fix #633: fix test failure in coverage run 2018-12-20 19:00:39 -05:00
Julia Yatsenko 9f7f93776e fix #635: added test for fs.ftruncate() 2018-12-20 15:07:17 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca b5fe85caaa Fixes to pass 0.43 migration test 2018-12-18 11:04:13 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca f738cbc17d Fix #605: add migration tests for Filer 0.43 2018-12-17 21:29:53 -05:00
Vince b0809272a1 Included unwatchFile in test index.js
Co-authored-by: David Humphrey <david.humphrey@senecacollege.ca>
2018-12-17 16:39:44 -05:00
Vince fb76c0ec1e Fix #445 test cases for fs.unwatchFile 2018-12-17 16:39:44 -05:00
qwang135 9a7d3514d8 Fix #514: add test for fsPromises.lstat with directory
Co-authored-by: David Humphrey <david.humphrey@senecacollege.ca>
2018-12-17 16:30:21 -05:00
Yuecheng Wu 848cc7d3de Adding more tests for fs.copyFile
Co-authored-by: David Humphrey <david.humphrey@senecacollege.ca>
2018-12-17 16:18:06 -05:00
David Humphrey ba188169d6 Review fixes, skip copyFile test for now 2018-12-17 16:06:24 -05:00
mordax 62cbe11a93 Fixed lint issues in copyFile test 2018-12-17 15:56:55 -05:00
mordax ef80713c33 Added tests for future fs.copyFile implementation and adjusted index.js to run it. 2018-12-17 15:56:55 -05:00
Alexei Kozachenko 0eb7066a86 Added mkdtemp method (issue #441)
Added/fixed mkdtemp method (issue 441)

Added/fixed mkdtemp method (issue 441)

Added/fixed mkdtemp method (issue 441)

fixed a typo

Added mkdtemp method description to readme

Unit tests for mkdtemp method added (issue #394)

Added generateRandom(), randomChars() to shared.js. Corrections in README. Fixes for mkdtemp method

cleaned up mkdtemp()

fixed regex

Fix for failing test (humphd)
2018-12-15 00:39:09 -05:00
David Humphrey 158f6241b6 Fixes from #504 to pass lint, travis 2018-12-15 00:17:43 -05:00
Dan Lin 4a5d8c1222 Fix #456 - add test for fs.write() with undefined path 2018-12-15 00:14:13 -05:00
kwkofler 443b582038 Issue #86: Added support for Unix Timestamps
Co-authored-by: David Humphrey <david.humphrey@senecacollege.ca>
2018-12-14 23:58:42 -05:00
David Humphrey 83bd64fd58 Fix lint issues in #521 2018-12-14 22:18:25 -05:00
imedqq 783e7a9e67 Added newline at end of file 2018-12-14 22:18:25 -05:00
imedqq 2aa6cf2b5f Added promise-based test cases for rmdir 2018-12-14 22:18:25 -05:00
David Humphrey acef2c93b0 Update https://github.com/filerjs/filer/pull/485 to master, add tests + fix. 2018-12-14 22:05:51 -05:00
Deepanjali Gerangal 94fd5ba829 Fix#418-updated method 2018-12-14 19:24:55 -05:00
Deepanjali Gerangal e3a285ae54 fix #418 test for fsPromises.truncate(path[, len]) to test when length is negative 2018-12-14 19:24:19 -05:00
Petr Bouianov 1775c24d37 Fixes issue 75
As the array flags were already reflected in the README documentation
and example, this only required a test
2018-12-14 17:31:31 -05:00
David Humphrey 2841b2eba7 Fixes from review 2018-12-12 22:09:41 -05:00
Mera-Gangapersaud 0352dad66c Corrected Travis CI error for issue 500 2018-12-12 22:09:41 -05:00
David Humphrey 33339b81d7 Fix review issues 2018-12-12 21:38:16 -05:00
Adam 7e941bb304 Update fs.symlink.spec.js 2018-12-12 21:38:16 -05:00
Adam db237e617b update fs.symlink.spec.js based on code review
white spaces , comments added, Promises.Open used
2018-12-12 21:38:16 -05:00
Pooch11 0a1aa0fecc Added tests for symlink using promises api 2018-12-12 21:38:16 -05:00
David Humphrey 16e6b3e1c9 Fix review issues 2018-12-12 21:31:27 -05:00
Dragomegak af3815c54b Removes Symbolic Link check & Fixing Mixing Callbacks and Promises (Basically the fs.link test though) 2018-12-12 21:27:13 -05:00
Dragomegak 0748951ca8 Changed code to reflect promise syntax 2018-12-12 21:27:13 -05:00
Dragomegak 265f0b1d0d Added fsPromises.link() tests 2018-12-12 21:27:13 -05:00
David Humphrey 1c450ae8e7 Fix review nits, move contents to earlier scope and reuse. 2018-12-12 21:08:30 -05:00
PopeSpaceous 0395c4beae Fix issue-447: Added test to append numbers in fs.appendFile function 2018-12-12 21:08:30 -05:00
jagmeetb 1abcb0369b Fix #431: add test for fsPromises.unlink
add newline at end

implemented suggestions

formatting fixes
2018-12-12 20:59:41 -05:00
David Humphrey d1dd5fef61 Finishing work in #401 2018-12-10 23:57:10 -05:00
Josh Mayers e85880dc8b Fix Issue #399 - added test cases for appendFile with promises 2018-12-10 23:57:10 -05:00
David Humphrey 97a6004091
Fix #604: cli for buidling JSON image from folder (#613)
* Fix #604: cli for buidling JSON image from folder

* Allow passing --filer to specify a filer module to use (different version)

* Deal with fs.chown not existing on older versions of Filer

* Tidy up some loose ends

* Make fs-image.js executable
2018-12-06 22:22:18 -05:00
David Humphrey 5218057d80 Follow-up from #603, rename ImportExportProvider to SerializableMemoryProvider 2018-12-05 10:18:31 -05:00
David Humphrey 61a1f5e020 Fix #603: add import/export provider to work with JSON fs images 2018-12-04 22:54:29 -05:00
Deepanjali Gerangal 0f93a04e40 Fix for issue #561 - Extend fs.access to support R_OK, W_OK, and X_OK (#601)
* added extended test for fs.access

* making requested changes
2018-12-03 23:08:40 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca f5678ebe20 Rebase and rework test, skip() for now, see #594 2018-12-02 10:19:43 -05:00
kwkofler 97fb82769a Issue #158 - Added test to ensure that watchers monitoring hardlinks are notified when the original file is updated 2018-12-02 10:19:43 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca 7d196763f8 Update docs, fix test failure 2018-12-02 00:05:57 -05:00
kwkofler 6a5d9073f3 Issue 87 - Added fs.fsync() as a no-op, and added tests. Modified documentation.
Made requested changes to tests, functionality; reverted doc changes
2018-12-02 00:05:57 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca a107fe21d7 Fix #337: Pick up sedge's changes from 3c49743559 2018-12-01 22:20:09 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca d7945d745d Fix #577: deal with promise exceptions and test console spam 2018-12-01 22:07:24 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca 923b999e89 Fix #547: update Buffer use, docs, tests to match node.js v11.3.0 2018-12-01 20:05:05 -05:00
David Humphrey (:humph) david.humphrey@senecacollege.ca cc6e3f7edf Increase coverage: check for non-int with chown/fchown 2018-11-29 22:47:26 -05:00
David Humphrey 43d2632069 Improve coverage: add test for rel paths with symlink 2018-11-29 16:57:06 -05:00
yatsenko-julia f57c7330d3 fix #556: added tests for fs.ftruncate method (#557)
* fix #556: added tests for fs.ftruncate method

* Update fs.ftruncate.spec.js
2018-11-28 22:42:17 -05:00
David Humphrey d1cf1286cb Fix #576: remove unnecessary methods from fs.promises, adjust tests to match 2018-11-28 19:42:32 -05:00
David Humphrey 2135ee17e9 Update fs.stat.spec.js to not have uncaught exception on promise 2018-11-28 19:41:46 -05:00
David Humphrey 725bfbf30c
Fixes #422: Add nyc lcov-based code coverage for tests (#565)
* Add nyc lcov-based code coverage for tests

* Add codecov to travis

* Add codecov badge to README
2018-11-28 19:24:03 -05:00
yuzhouChen 89626107cc Fix #568: switch all stats.type checks in tests/ to use is*() methods (#581)
* Fix Issue#568

* Fix issue 568: two more file changes

* Fix issue 568: more changes in tests/spec/shell/ls.spec.js
2018-11-28 13:54:20 -05:00
Susan Truong a25d71b524 Fix #435: add a test for fsPromise.unlink() to delete a file that does not exist
Make changes to `fsPromises.unlink()` to be more promise-friendly

Added a newline to the end of the file

Made a change to fsPromises.unlink() to be more friendly

Changed the description of the promises test
2018-11-27 13:18:39 -05:00
Alan K d1afe9719d
Merge pull request #476 from steaward/issue-420
Fixes #420
2018-11-22 01:46:52 -05:00
Deepanjali Gerangal 400b2c3c88 Fix #558 - Implementing fs.access() method (#560)
* Implementing fs.access() method

* added new line to access.js

* updated requested changes

* updated README.md with fs.access

* fixing truncate error

* updated README.md

* changed access.js to access.spec.js
2018-11-17 15:31:20 -05:00
Alexander Ponomaroff ce030b91fa Fix issue #398 - Add testing for promises to all test cases in fs.writeFile-readFile.spec.js file (#402)
* Fix issue #398 - Add testing for promises to all test cases in fs.writeFile-readFile.spec.js file

* Fix issue #398 - Add testing for promises to all test cases in fs.writeFile-readFile.spec.js file

* Fixed requested issues

* Further Improvement
2018-10-20 16:59:26 -04:00
Deepanjali Gerangal 5568c27bec fix for #542 for fsPromises.symlink(target, path[, type]) (#543)
* updating fs.symlink for promises

* updated the requested changes

* fix#542 added a newline at end
2018-10-20 16:57:45 -04:00
Volodymyr Klymenko bfcb5a6a94 Added tests for Promises version of mkdir (#415) 2018-10-16 19:27:12 -04:00
ThomasNolte 3bbabfcb4a added tests for fs.promises.chown() closes #465 (#471)
* added tests for fs.promises.chown() for check if function exists and updating gid/uid for a file

* update to pass lint tests

* cleaned up code. replaced all callbacks with promises in new test.

* Revert "lint tests fix"

This reverts commit 3c256124cf, reversing
changes made to 71a6f514fc.

* Revert "cleaned up code. replaced all callbacks with promises in new test."

This reverts commit 71a6f514fc.

* Made requested changes.
2018-10-16 11:43:59 -04:00
Shawn Pang 1eab5f0ffd Fix#461 - Added test for fs.read when attempting to read a file that does not exist (#472)
* Added test for fs.read when attempting to read a file that does not exist

* Added test for fs.read when attempting to read a file that does not exist

* Modified read test for non-existent file to act more similar to earlier tests

* Added check in read test for error code
2018-10-16 11:22:54 -04:00
yatsenko-julia 73f0f19bb9 Fix #523: added tests for fs.ftruncate() (#524)
* Fix #523: added tests for fs.ftruncate()

* fix #523: moved a function from truncate to ftruncate and made a few minor changes

* Fixed indentation
2018-10-16 11:21:49 -04:00
bblarney 707d404db0 Issue 417 - Added test for fs.promises.rename to rename existing directory (#460)
* test added

* working so far

* done

* cleaned up a catch

* made some requested changes
2018-10-16 11:07:10 -04:00
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
Stephen Ward 675773b92a re-added the newline, as well as another test case to make sure mode is still set to default value when a new file is opened 2018-10-10 15:10:34 -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
Stephen Ward 7a6a4160e6 made changes as per thomas's and dave's PR review 2018-10-09 20:25:19 -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