File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,26 @@ import Vue from 'vue'
2
2
import Basic from './resources/Basic.vue'
3
3
import jestVue from '../jest-vue'
4
4
import { resolve } from 'path'
5
- import { readFileSync , writeFileSync } from 'fs'
5
+ import {
6
+ readFileSync ,
7
+ writeFileSync ,
8
+ renameSync
9
+ } from 'fs'
6
10
7
11
test ( 'processes .vue files' , ( ) => {
8
12
const vm = new Vue ( Basic ) . $mount ( )
9
13
expect ( typeof vm . $el ) . toBe ( 'object' )
10
14
} )
11
15
16
+ test ( 'processes .vue files with default babel if there is no .babelrc' , ( ) => {
17
+ const babelRcPath = resolve ( __dirname , '../.babelrc' )
18
+ const tempPath = resolve ( __dirname , '../.renamed' )
19
+ renameSync ( babelRcPath , tempPath )
20
+ const vm = new Vue ( Basic ) . $mount ( )
21
+ expect ( typeof vm . $el ) . toBe ( 'object' )
22
+ renameSync ( tempPath , babelRcPath )
23
+ } )
24
+
12
25
test ( 'processes .vue files using .babelrc if it exists in route' , ( ) => {
13
26
const babelRcPath = resolve ( __dirname , '../.babelrc' )
14
27
const babelRcOriginal = readFileSync ( babelRcPath , { encoding : 'utf8' } )
You can’t perform that action at this time.
0 commit comments