# vue-jest-kn

> Jest Vue transform that loads a custom tsconfig - temporary

Latest version **2.0.2** (published 2018-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-jest-kn
pnpm add vue-jest-kn
yarn add vue-jest-kn
bun add vue-jest-kn
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2018-02-07 |
| First published | 2018-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 26.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Edd Yerburgh, Lars Eggert |
| Maintainers | knlarseggert |
| Keywords | jest, vue, jest vue, jest vue transform, jest vue preprocessor, vue jest, vue jest, vue jest transform, vue jest preprocessor |

## Links

- npm: https://www.npmjs.com/package/vue-jest-kn
- Repository: https://github.com/webforgeeu/vue-jest
- Homepage: https://github.com/webforgeeu/vue-jest#readme
- Issues: https://github.com/webforgeeu/vue-jest/issues
- npm.io page: https://npm.io/package/vue-jest-kn

## Dependencies (10)

- [chalk](https://npm.io/package/chalk.md) ^2.1.0
- [tsconfig](https://npm.io/package/tsconfig.md) ^7.0.0
- [node-cache](https://npm.io/package/node-cache.md) ^4.1.1
- [source-map](https://npm.io/package/source-map.md) ^0.5.6
- [js-beautify](https://npm.io/package/js-beautify.md) ^1.6.14
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [extract-from-css](https://npm.io/package/extract-from-css.md) ^0.4.4
- [find-babel-config](https://npm.io/package/find-babel-config.md) ^1.1.0
- [vue-template-es2015-compiler](https://npm.io/package/vue-template-es2015-compiler.md) ^1.5.3
- [babel-plugin-transform-es2015-modules-commonjs](https://npm.io/package/babel-plugin-transform-es2015-modules-commonjs.md) ^6.26.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2018-02-07
- 2.0.1 — 2018-02-06

## README

# vue-jest-kn

Jest Vue transformer with source map support<br />
custom tsconfig support - temporary npm, please avoid usage as it will be deleted sooner than later


## Usage

```
npm install --save-dev vue-jest-kn
```

## Setup

To define vue-jest as a transformer for your .vue files, you need to map .vue files to the vue-jest module.

```
"transform": {
  ".*\\.(vue)$": "<rootDir>/node_modules/vue-jest-kn"
},
```

To use source maps, you need to set `mapCoverage` to `true`. A full config will look like this.

```json
{
  "jest": {
    "moduleFileExtensions": [
      "js",
      "json",
      "vue"
    ],
    "transform": {
      "^.+\\.js$": "<rootDir>/node_modules/babel-jest",
      ".*\\.(vue)$": "<rootDir>/node_modules/vue-jest-kn"
    },
    "mapCoverage": true
  }
}
```

## Example Projects

Example repositories testing Vue components with jest and vue-jest:

- [Avoriaz with Jest](https://github.com/eddyerburgh/avoriaz-jest-example)
- [Vue Test Utils with Jest](https://github.com/eddyerburgh/vue-test-utils-jest-example)

## Supported langs

vue-jest compiles the script and template of SFCs into a JavaScript file that Jest can run. **It does not currently compile the style section**.

### Supported script languages

- **typescript** (`lang="ts"`, `lang="typescript"`)
- **coffeescript** (`lang="coffee"`, `lang="coffeescript"`)

### Supported template languages

- **pug** (`lang="pug"`)
- **jade** (`lang="jade"`)
- **haml** (`lang="haml"`)

---
_Source: https://npm.io/package/vue-jest-kn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
