- I completed all of Part 1 - Read and Write to a File.
- I started Part 2 - Reading Multiple Files.
- I only completed this up to Task 1: Fix the broken code.
- I figured out Task 1 pretty quickly, but spent a lot of time trying to get the first test to pass (there was an issue with the mock included in the demo code).
- Still working on getting JSdocs up and running.
- jsdoc not working yet
Using the node CLI (see instruction below), reads, adds to, and reads a file again. Nested node filesystem (fs.
) functions accomplish this and have the results logged to the console.
reader.readAll([...files], callback) -> number
Given an array of files and a callback error handler function, reads the file name and contents of each file.
The callback function takes (err, data)
. If there is an error, the error handler will run.
npm i
- install dependencies
node edit-file files/test.txt
- Reads a file, appends a random word to that file, reads the file againnode index.js files/1.txt files/2.txt files/3.txt
- Reads the file names and contents of 3 files
npm test
to run tests- Assertions: to do
- Assertions to be made: to do
UML image goes here