https://github.com/plcoster/ubcx-software-engineering-assertions-example
https://github.com/plcoster/ubcx-software-engineering-assertions-example
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/plcoster/ubcx-software-engineering-assertions-example
- Owner: PLCoster
- License: mit
- Created: 2022-07-15T06:16:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-15T06:44:25.000Z (almost 4 years ago)
- Last Synced: 2025-06-14T06:32:58.855Z (about 1 year ago)
- Language: TypeScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UBCx Software Engineering
## 3. Testing
### Assertions Example
This is a repo to fill in for the missing project repo for the Assertions Example in the Testing module of the UBCx Software Engineering course. This repo contains two projects, a starter project that can be used to follow along with the course video in a code-along style, and a finished solution project.
To use these projects, first Node and the Node Package Manager (npm) must be installed, which is best done with a Node version manager like nvm. See here for example installation details: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
Once these are installed, clone or download this repo, then open the desired project folder (starter or solution). While in a project folder (containing a `package.json` file), the required dependencies can be installed by entering in the terminal:
`npm i`
After the dependencies have been installed the test suite can be run using:
`npm run test`
And code coverage metrics can be run using:
`npm run coverage`
After running the coverage tests, a `coverage` folder will be created inside the project. Inside this, there is an `index.html` file which you can open to view more detailed coverage information. (This may require you to install the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension in VS Code to allow it to be viewed properly (right click on `coverage/index.html` -> Open with Live Server), or otherwise open the `index.html` file in your browser)