You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,19 @@
1
1
# vue-jest
2
2
3
-
Jest Vue transformer with source map support
3
+
Jest transformer for Vue single file components
4
4
5
5
> **NOTE:** This is documentation for `vue-jest@4.x`. [View the vue-jest@3.x documentation](https://github.com/vuejs/vue-jest/tree/v3)
6
6
7
7
## Usage
8
8
9
9
```bash
10
10
npm install --save-dev vue-jest
11
+
yarn add vue-jest --dev
11
12
```
12
13
13
14
## Setup
14
15
15
-
To define`vue-jest` as a transformer for your `.vue` files, map them to the `vue-jest` module:
16
+
To use`vue-jest` as a transformer for your `.vue` files, map them to the `vue-jest` module:
16
17
17
18
```json
18
19
{
@@ -38,16 +39,15 @@ A full config will look like this.
38
39
}
39
40
```
40
41
41
-
## Example Projects
42
+
## Examples
42
43
43
44
Example repositories testing Vue components with jest and vue-jest:
44
45
45
-
-[Avoriaz with Jest](https://github.com/eddyerburgh/avoriaz-jest-example)
46
46
-[Vue Test Utils with Jest](https://github.com/eddyerburgh/vue-test-utils-jest-example)
47
47
48
48
## Supported langs
49
49
50
-
vue-jest compiles the script and template of SFCs into a JavaScript file that Jest can run. **Currently, SCSS, SASS and Stylus are the only style languages that are compiled**.
50
+
vue-jest compiles `<script />`, `<template />`, and `<style />` blocks with supported `lang` attributes into JavaScript that Jest can run.
0 commit comments