https://github.com/kohrongying/sapper-jest-typescript-template
A Sapper App template with Jest and Typescript
https://github.com/kohrongying/sapper-jest-typescript-template
jest sapper svelte ts
Last synced: about 2 months ago
JSON representation
A Sapper App template with Jest and Typescript
- Host: GitHub
- URL: https://github.com/kohrongying/sapper-jest-typescript-template
- Owner: kohrongying
- Created: 2020-09-05T08:20:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-06T15:13:25.000Z (over 4 years ago)
- Last Synced: 2025-01-27T22:14:23.543Z (4 months ago)
- Topics: jest, sapper, svelte, ts
- Language: JavaScript
- Homepage: https://kohrongying.github.io/sapper-jest-typescript-template/
- Size: 297 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sapper-Jest-Typescript Template
Cloned from [sapper template](https://github.com/sveltejs/sapper-template) + other fun stuff
### Features
- [x] Typescript
- [x] Jest with coverage
- [x] Cypress (comes with sapper template)
- [x] Github Action to test and validate ts and build to `docs` branchThe main reason was that I wanted a fast test set up as I considered cypress as a end to end sort of integration testing. You may refer to `src/components/Nav.test.ts` for a sample test written to test individual svelte components.
Deployed to [Github Pages](https://kohrongying.github.io/sapper-jest-typescript-template/)
**Note:**
- Require a relative baseUrl in order to be deployed onto Github pages
- `src/server.js`: add base url to polka
- `package.json/scripts`: add `--basepath ` to export
- `.github/workflows/build.yml`: For deploy action, update deploy folder to `__sapper__/export/`### List of commands
```bash
# Install dependencies
npm install# Run
npm run dev# Test
npm t
npm run test# Watch tests
npm run test:watch# Integration test with cypress
npm run test:integration# Validate typescript
npm run validate# Build files
npm run build
```