Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/vue-jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v28.0.1
Choose a base ref
...
head repository: vuejs/vue-jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v28.1.0
Choose a head ref
  • 4 commits
  • 24 files changed
  • 4 contributors

Commits on Aug 15, 2022

  1. Fix source maps for vue2-jest (#486)

    * Fix source maps for vue2-jest
    
    * Remove duplicate append
    
    * Fix snapshot paths to match github CI
    NikhilVerma authored Aug 15, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4530039 View commit details
  2. feat: load TypeScript config from tsconfig package instead of `ts-j…

    …est` (#471)
    
    * chore(deps): add `tsconfig` package on @vue/vue2-jest
    
    * feat: add `getTypeScriptConfig` util function
    
    * feat: use `getTypeScriptConfig` on typescript transformer
    
    * feat: remove `getTsJestConfig` function
    
    * chore(deps): remove ts-jest dependencies
    
    * chore(deps-dev): remove ts-jest from e2e projects
    
    * feat: remove info log
    
    * feat: support `createTransformer()` on customTransformer
    nogic1008 authored Aug 15, 2022
    Copy the full SHA
    a84eafb View commit details

Commits on Aug 16, 2022

  1. fix: Less relative path in imports (#475)

    Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
    cmath10 and lmiller1990 authored Aug 16, 2022
    Copy the full SHA
    77c821d View commit details
  2. publish 28.1.0

    lmiller1990 committed Aug 16, 2022
    Copy the full SHA
    6d1eec5 View commit details
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -27,3 +27,4 @@ pids
package-lock.json
/e2e/**/yarn.lock

.vscode
1 change: 0 additions & 1 deletion e2e/2.x/babel-in-package/package.json
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@
"coffeescript": "^2.3.2",
"jest": "28.x",
"jest-environment-jsdom": "28.0.2",
"ts-jest": "^28.0.1",
"typescript": "^4.6.4"
},
"jest": {
79 changes: 52 additions & 27 deletions e2e/2.x/basic/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
@@ -2,35 +2,48 @@

exports[`generates source maps for .vue files 1`] = `
Object {
"mappings": ";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AAPA;AASA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAHA;AAjBA;;;;AAvBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA",
"names": Array [],
"file": "/home/runner/work/vue-jest/vue-jest/e2e/2.x/basic/components/Basic.vue",
"mappings": ";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;eAEe;AACbA,MAAI,EAAE,OADO;AAEbC,UAAQ,EAAE;AACRC,kBAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,aAAO;AACLC,WAAG,EAAE,KAAKC,OADL;AAELC,YAAI,EAAE,CAAC,KAAKD,OAFP;AAGLE,cAAM,EAAE,KAAKF;AAHR,OAAP;AAKD;AAPO,GAFG;AAWbG,MAAI,EAAE,SAASA,IAAT,GAAgB;AACpB,WAAO;AACLC,SAAG,EAAE,4BADA;AAELJ,aAAO,EAAE;AAFJ,KAAP;AAID,GAhBY;AAiBbK,SAAO,EAAE;AACPC,eAAW,EAAE,SAASA,WAAT,GAAuB;AAClC,WAAKN,OAAL,GAAe,CAAC,KAAKA,OAArB;AACD;AAHM;AAjBI,C",
"names": Array [
"name",
"computed",
"headingClasses",
"red",
"isCrazy",
"blue",
"shadow",
"data",
"msg",
"methods",
"toggleClass",
],
"sources": Array [
"Basic.vue",
],
"sourcesContent": Array [
"<template>
<div class=\\"hello\\">
<h1 :class=\\"headingClasses\\">{{ msg }}</h1>
</div>
</template>
<style module=\\"css\\">
.testA {
background-color: red;
}
</style>
<style module>
.testB {
background-color: blue;
}
</style>
<style>
.testC {
background-color: blue;
}
</style>
"//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
<script>
export default {
name: 'basic',
computed: {
@@ -54,7 +67,6 @@ export default {
}
}
}
</script>
",
],
"version": 3,
@@ -63,8 +75,21 @@ export default {

exports[`generates source maps using src attributes 1`] = `
Object {
"mappings": ";;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AAPA;AASA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAHA;AAjBA",
"names": Array [],
"file": "/home/runner/work/vue-jest/vue-jest/e2e/2.x/basic/components/SourceMapsSrc.vue",
"mappings": ";;;;;;eAAe;AACbA,MAAI,EAAE,OADO;AAEbC,UAAQ,EAAE;AACRC,kBAAc,EAAE,SAASA,cAAT,GAA0B;AACxC,aAAO;AACLC,WAAG,EAAE,KAAKC,OADL;AAELC,YAAI,EAAE,CAAC,KAAKD,OAFP;AAGLE,cAAM,EAAE,KAAKF;AAHR,OAAP;AAKD;AAPO,GAFG;AAWbG,MAAI,EAAE,SAASA,IAAT,GAAgB;AACpB,WAAO;AACLC,SAAG,EAAE,4BADA;AAELJ,aAAO,EAAE;AAFJ,KAAP;AAID,GAhBY;AAiBbK,SAAO,EAAE;AACPC,eAAW,EAAE,SAASA,WAAT,GAAuB;AAClC,WAAKN,OAAL,GAAe,CAAC,KAAKA,OAArB;AACD;AAHM;AAjBI,C",
"names": Array [
"name",
"computed",
"headingClasses",
"red",
"isCrazy",
"blue",
"shadow",
"data",
"msg",
"methods",
"toggleClass",
],
"sources": Array [
"SourceMapsSrc.vue",
],
5 changes: 2 additions & 3 deletions e2e/2.x/basic/package.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@vue/test-utils": "^1.1.0",
"@vue/vue2-jest": "^28.0.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
@@ -23,9 +24,7 @@
"jest-environment-jsdom": "28.0.2",
"pug": "^3.0.1",
"sass": "^1.23.7",
"ts-jest": "^28.0.1",
"typescript": "^4.6.4",
"@vue/vue2-jest": "^28.0.0"
"typescript": "^4.6.4"
},
"jest": {
"testEnvironment": "jsdom",
4 changes: 2 additions & 2 deletions e2e/2.x/basic/test.js
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ test('generates source maps for .vue files', () => {
config
})

expect(map).toMatchSnapshot()
expect(JSON.parse(map)).toMatchSnapshot()
})

test('generates source maps using src attributes', () => {
@@ -67,7 +67,7 @@ test('generates source maps using src attributes', () => {
config
})

expect(map).toMatchSnapshot()
expect(JSON.parse(map)).toMatchSnapshot()
})

test('processes .vue file using jsx', () => {
11 changes: 10 additions & 1 deletion e2e/2.x/style/components/Less.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<template>
<div />
<div>
<div :class="$style.a">a</div>
<div :class="$style.b">b</div>
<div :class="$style.c">c</div>
<div :class="$style.d">d</div>
</div>
</template>

<style module lang="less">
@import './styles/less-a.less';
.a {
background-color: @primary-color;
}
.b {
color: @primary-color;
}
</style>
7 changes: 7 additions & 0 deletions e2e/2.x/style/components/styles/less-a.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "variables";
.c {
color: @primary-color;
}
.d {
background-color: @primary-color;
}
4 changes: 2 additions & 2 deletions e2e/3.x/babel-in-package/package.json
Original file line number Diff line number Diff line change
@@ -12,12 +12,12 @@
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@vue/vue3-jest": "^28.0.0",
"coffeescript": "^2.3.2",
"jest": "^28.0.0",
"jest-environment-jsdom": "28.0.2",
"ts-jest": "^28.0.1",
"typescript": "^4.6.4",
"@vue/vue3-jest": "^28.0.0"
"typescript": "^4.6.4"
},
"jest": {
"testEnvironment": "jsdom",
2 changes: 1 addition & 1 deletion e2e/3.x/basic/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@vue/vue3-jest": "^28.0.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
@@ -23,7 +24,6 @@
"ts-jest": "^28.0.1",
"typescript": "^4.6.4",
"vue-class-component": "^8.0.0-beta.4",
"@vue/vue3-jest": "^28.0.0",
"vue-property-decorator": "^10.0.0-rc.3"
}
}
5 changes: 2 additions & 3 deletions e2e/3.x/typescript-with-babel/package.json
Original file line number Diff line number Diff line change
@@ -12,11 +12,10 @@
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@vue/vue3-jest": "^28.0.0",
"jest": "^28.0.2",
"jest-environment-jsdom": "28.0.2",
"ts-jest": "^28.0.1",
"typescript": "^4.6.4",
"@vue/vue3-jest": "^28.0.0"
"typescript": "^4.6.4"
},
"jest": {
"testEnvironment": "jsdom",
4 changes: 2 additions & 2 deletions e2e/3.x/typescript-with-compiler-options/package.json
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@
},
"devDependencies": {
"@types/jest": "16.0.10",
"@vue/vue3-jest": "^28.0.0",
"jest": "^28.0.2",
"jest-environment-jsdom": "28.0.2",
"ts-jest": "^28.0.1",
"typescript": "^4.6.4",
"@vue/vue3-jest": "^28.0.0"
"typescript": "^4.6.4"
},
"jest": {
"testEnvironment": "jsdom",
4 changes: 2 additions & 2 deletions e2e/3.x/typescript/package.json
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@
},
"devDependencies": {
"@types/jest": "16.0.10",
"@vue/vue3-jest": "^28.0.0",
"jest": "^28.0.2",
"jest-environment-jsdom": "28.0.2",
"ts-jest": "^28.0.1",
"typescript": "^4.6.4",
"@vue/vue3-jest": "^28.0.0"
"typescript": "^4.6.4"
},
"jest": {
"testEnvironment": "jsdom",
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -45,6 +45,10 @@
"pre-commit": "lint-staged"
}
},
"prettier": {
"semi": false,
"singleQuote": true
},
"lint-staged": {
"*.{js,json,css,md,vue}": [
"yarn format",
Loading