File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,25 @@ describe('Compiler', () => {
2525 cache . mfs . unlinkSync ( filePath ) ;
2626 } ) ;
2727 } ) ;
28+ it ( 'Compiler.compile() should be ok with js file' , done => {
29+ const filePath = path . resolve ( __dirname , '../vue_file/test.js' ) ;
30+ const compiler = new Compiler ( ) ;
31+ compiler . compile ( filePath ) . then ( ( ) => {
32+ const file = cache . mfs . readFileSync ( filePath ) ;
33+ if ( file ) {
34+ done ( ) ;
35+ } else {
36+ done ( 'compiler file write fail' ) ;
37+ }
38+
39+ cache . storage . delete ( filePath ) ;
40+ cache . mfs . unlinkSync ( filePath ) ;
41+ } ) . catch ( e => {
42+ done ( e ) ;
43+ cache . storage . delete ( filePath ) ;
44+ cache . mfs . unlinkSync ( filePath ) ;
45+ } ) ;
46+ } ) ;
2847 it ( 'Compiler.constructor() should be ok with options.watch' , done => {
2948 const filePath = path . resolve ( __dirname , '../vue_file/simple.vue' ) ;
3049 const compiler = new Compiler ( { watch : true } ) ;
Original file line number Diff line number Diff line change 1+ const config = {
2+ install ( Vue ) {
3+ }
4+ } ;
5+ export default config ;
You can’t perform that action at this time.
0 commit comments