Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobhsu/unit-testing-vue
https://github.com/jacobhsu/unit-testing-vue
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacobhsu/unit-testing-vue
- Owner: JacobHsu
- Created: 2020-03-14T07:39:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T05:17:58.000Z (about 2 years ago)
- Last Synced: 2024-04-10T16:05:27.927Z (9 months ago)
- Language: JavaScript
- Size: 3.71 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# unit-testing-vue
Vue CLI v3.0.3
? Target directory D:\Jacob\github\unit-testing-vue already exists. Pick an action: `Merge`Vue CLI v3.0.3
? Please pick a preset: `Manually select features`
? Check the features needed for your project: `Babel, Router, Vuex, Linter, Unit`
? Use history mode for router? (Requires proper server setup for index fallback in production) `Yes`
? Pick a linter / formatter config: `Prettier`
? Pick additional lint features: `Lint on save`
? Pick a unit testing solution: `Jest`
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? `In dedicated config files`
? Save this as a preset for future projects? `No`[.prettierrc.js](https://prettier.io/docs/en/configuration.html)
```js
module.exports = {
singleQuote: true,
semi: false
}
````$ yarn test:unit`
https://www.vuemastery.com/courses/unit-testing/writing-a-unit-test-with-jest/
https://www.vuemastery.com/courses/unit-testing/Testing-Props-and-User-Interaction## testing-api-calls
@vue/cli-plugin-unit-jest" ^3.0.3
:::error::: getMessage.mockResolvedValueOnce FAIL`yarn add @vue/cli-plugin-unit-jest@^4.1.0`
## json-server
`$ json-server --watch db.json`
## Project setup
```
yarn install
```### Compiles and hot-reloads for development
```
yarn run serve
```### Compiles and minifies for production
```
yarn run build
```### Lints and fixes files
```
yarn run lint
```### Run your unit tests
```
yarn run test:unit
```