File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ const fs = require ( 'fs' ) ;
4+ const path = require ( 'path' ) ;
35const acorn = require ( 'acorn' ) ;
46const request = require ( 'supertest' ) ;
57const testServer = require ( '../helpers/test-server' ) ;
@@ -13,7 +15,21 @@ describe('bundle', () => {
1315 // only be avoided with babel-loader
1416 const runBundleTest = isWebpack5 ? describe . skip : describe ;
1517
16- runBundleTest ( 'bundled output' , ( ) => {
18+ runBundleTest ( 'index.bundle.js bundled output' , ( ) => {
19+ it ( 'should parse with ES5' , ( ) => {
20+ const bundleStr = fs . readFileSync (
21+ path . resolve ( __dirname , '../../client/default/index.bundle.js' ) ,
22+ 'utf8'
23+ ) ;
24+ expect ( ( ) => {
25+ acorn . parse ( bundleStr , {
26+ ecmaVersion : 5 ,
27+ } ) ;
28+ } ) . not . toThrow ( ) ;
29+ } ) ;
30+ } ) ;
31+
32+ runBundleTest ( 'main.js bundled output' , ( ) => {
1733 let server ;
1834 let req ;
1935
You can’t perform that action at this time.
0 commit comments