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'
22import Basic from './resources/Basic.vue'
33import jestVue from '../jest-vue'
44import { resolve } from 'path'
5- import { readFileSync , writeFileSync } from 'fs'
5+ import {
6+ readFileSync ,
7+ writeFileSync ,
8+ renameSync
9+ } from 'fs'
610
711test ( 'processes .vue files' , ( ) => {
812 const vm = new Vue ( Basic ) . $mount ( )
913 expect ( typeof vm . $el ) . toBe ( 'object' )
1014} )
1115
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+
1225test ( 'processes .vue files using .babelrc if it exists in route' , ( ) => {
1326 const babelRcPath = resolve ( __dirname , '../.babelrc' )
1427 const babelRcOriginal = readFileSync ( babelRcPath , { encoding : 'utf8' } )
You can’t perform that action at this time.
0 commit comments