https://github.com/colindembovsky/copilot-express-demo
Quick Copilot Demo to show creating code, tests, mocks and Actions
https://github.com/colindembovsky/copilot-express-demo
copilot expressjs
Last synced: about 1 year ago
JSON representation
Quick Copilot Demo to show creating code, tests, mocks and Actions
- Host: GitHub
- URL: https://github.com/colindembovsky/copilot-express-demo
- Owner: colindembovsky
- Created: 2023-06-01T15:16:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-08T13:30:18.000Z (about 3 years ago)
- Last Synced: 2025-02-05T22:19:27.075Z (over 1 year ago)
- Topics: copilot, expressjs
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Copilot Demo 🚀
This sample repo can be used to generate a quick app with unit tests/mocks and an Actions workflow.
## Walkthrough
Have a browser open with the completed code (on `main`) as your cheat-sheet.
1. Open the `demo-start` branch in a Codespace
2. Add a new file called `github-wrapper.js`
3. In a terminal, run `npm install octokit` to install the Octokit package
4. Create a class/method to get repos for a user
5. Open `index.js` and add the method call to the method
6. Show it running in the browser (browse to the corresponding route)
7. Create a new file called `github-wrapper.test.js`
8. Run `npm install jest --save-dev` to add Jest
9. Generate a mock Octokit
10. Generate the test method
11. Open `package.json` and add the `test: jest` command in `scripts`
12. Run `npm run test` to show the test running
13. Create `.github/workflows/build.yml`
14. Generate the workflow using Copilot