Lab 4
Complete the Github classroom assignment Opens in a new window. In Blackboard, submit a link to your repository.
This is an individual assignment, meaning you don't have to create branches or pull requests - you'll be working on your own code, and it won't interact or overwrite anyone else's code.
Whenever you commit a change, there are automated tests that I've created that will run to see if you've accomplished the requirements of this assignment.
Requirements
- In the /public/ folder, create two files:
another-module.js
my-module.js
- Use the code from
my-script.js
to populate these files:another-module.js
should exporttheShire
,buckland
, andHobbitSettlement
.my-module.js
should importtheShire
andbuckland
; it should exporttheShire
andstatement
- Resolve any issues flagged by the unit tests or style-checker.
It's recommended that you run the following commands before you push your code. It will be easier to read the output in your own terminal (and fix any style issues), rather than trying to read the output of the Github Action, as we have been doing.
- In your terminal, navigate to this project folder.
- Run the command `npm install`. This will install the necessary node modules.
- Run the command `npm test` to run the unit tests and see the output in your terminal.
- Run the command `npm run eslint` to run the style-checker and see the output in your terminal.
Note: The tests are written out in
/test/my-module.test.js
. Feel free to read that file if it's going to help you understand what's required.