{"id":20997849,"url":"https://github.com/vire/jest-vue-preprocessor","last_synced_at":"2025-04-05T14:09:40.736Z","repository":{"id":13946402,"uuid":"75427625","full_name":"vire/jest-vue-preprocessor","owner":"vire","description":"Preprocessor that allows importing of .vue files in jest tests","archived":false,"fork":false,"pushed_at":"2022-12-08T15:51:22.000Z","size":4758,"stargazers_count":130,"open_issues_count":45,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-06T21:54:50.186Z","etag":null,"topics":["jest","preprocessor","vuejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vire.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-02T20:15:45.000Z","updated_at":"2023-12-11T21:53:07.000Z","dependencies_parsed_at":"2022-08-09T09:40:17.886Z","dependency_job_id":null,"html_url":"https://github.com/vire/jest-vue-preprocessor","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vire%2Fjest-vue-preprocessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vire%2Fjest-vue-preprocessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vire%2Fjest-vue-preprocessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vire%2Fjest-vue-preprocessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vire","download_url":"https://codeload.github.com/vire/jest-vue-preprocessor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345856,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","preprocessor","vuejs"],"created_at":"2024-11-19T07:42:23.047Z","updated_at":"2025-04-05T14:09:40.719Z","avatar_url":"https://github.com/vire.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jest-vue-preprocessor\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/vire/jest-vue-preprocessor.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/vire/jest-vue-preprocessor.svg?branch=master)](https://travis-ci.org/vire/jest-vue-preprocessor) [![npm version](https://badge.fury.io/js/jest-vue-preprocessor.svg)](https://badge.fury.io/js/jest-vue-preprocessor) [![codecov](https://codecov.io/gh/vire/jest-vue-preprocessor/branch/master/graph/badge.svg)](https://codecov.io/gh/vire/jest-vue-preprocessor) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\n\nA [locoslab/vue-typescript-jest](https://github.com/locoslab/vue-typescript-jest) JavaScript port to allow Jest load [.vue files](https://vue-loader.vuejs.org/en/) in tests. This package supports both ES6 (Babel) and TypeScript.\n\nPortions both preprocessors are heavily based [vueify](https://github.com/vuejs/vueify) (Copyright (c) 2014-2016 Evan You).\n\n### Installation\n\n  1.  add package you your project\n    \n   *  `yarn add --dev jest-vue-preprocessor` or  `npm install --saveDev jest-vue-preprocessor`\n \n  2.  modify package.json's **jest** section by adding/editing **moduleFileExtensions** and **transform** properites:\n\n      ```javascript\n      \"jest\": {\n        \"moduleFileExtensions\": [\n          \"js\",\n          \"vue\"\n        ],\n        \"mapCoverage\": true,\n        \"transform\": {\n          \"^.+\\\\.js$\": \"\u003crootDir\u003e/node_modules/babel-jest\",\n          \".*\\\\.(vue)$\": \"\u003crootDir\u003e/node_modules/jest-vue-preprocessor\"\n        }\n      }\n      ```\n  3.  Start writing test that can import `*.vue` components - see example **./tests/index.spec.js**\n  4.  Profit!\n\n  ### Customization\n\n  * non-relative component imports - you properly set jest's `moduleMapper` option - see [#25](https://github.com/vire/jest-vue-preprocessor/issues/25)\n\n  ### [Contributing guide](https://github.com/vire/jest-vue-preprocessor/blob/master/CONTRIBUTING.md)\n\n  ### License: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvire%2Fjest-vue-preprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvire%2Fjest-vue-preprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvire%2Fjest-vue-preprocessor/lists"}