Skip to content
Open
bordasb opened this issue Oct 24, 2019 · 1 comment
Open

mock-fs #28

bordasb opened this issue Oct 24, 2019 · 1 comment
Assignees
Projects

Comments

@bordasb
Copy link
Contributor

bordasb commented Oct 24, 2019

  • create a simple example and tutorial
  • build a module that uploads images
  • write a test suite that uses mock-fs
@aa7401
Copy link
Contributor

aa7401 commented Oct 26, 2019

Could you add the project to a directory called file_system/ under the 07_unit_testing/ directory please. Make the project self contained and this should consist of a website with a single page that contains a form that allows the user to browse for and upload images. The images should display on the same page.

Create a custom module called uploads.js in the modules/ directory. This should contain all the logic needed both to upload an image and retrieve the details of all the images for display on the page.

You will need to add a unit test/ directory with some unit tests to check the module works correctly. This test suite should make use of the mock-fs module to ensure each tests runs against a sandboxed in-memory filesystem.

bordasb added a commit that referenced this issue Nov 4, 2019
I couldn't make mock-fs work properly, so the unit tests using it don't run. The web server also fails to receive the POST request with the image upload.
bordasb added a commit that referenced this issue Nov 25, 2019
@aa7401 aa7401 added this to To Do in Kanban Feb 7, 2020
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
Kanban
To Do
Development

No branches or pull requests

2 participants