File tree 1 file changed +17
-1
lines changed 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ const fs = require ( 'fs' ) ;
4
+ const path = require ( 'path' ) ;
3
5
const acorn = require ( 'acorn' ) ;
4
6
const request = require ( 'supertest' ) ;
5
7
const testServer = require ( '../helpers/test-server' ) ;
@@ -13,7 +15,21 @@ describe('bundle', () => {
13
15
// only be avoided with babel-loader
14
16
const runBundleTest = isWebpack5 ? describe . skip : describe ;
15
17
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' , ( ) => {
17
33
let server ;
18
34
let req ;
19
35
You can’t perform that action at this time.
0 commit comments