11'use strict' ;
22
33const { run } = require ( '../utils/test-utils' ) ;
4- const pkgLock = require ( '../../package.json' ) ;
4+ const pkgJSON = require ( '../../package.json' ) ;
55
66describe ( 'version flag with multiple arguments' , ( ) => {
77 it ( 'outputs version with mixed syntax' , ( ) => {
88 const { stdout, stderr } = run ( __dirname , [ '--version' , '--target' , 'browser' ] ) ;
9- expect ( stdout ) . toContain ( pkgLock . version ) ;
9+ expect ( stdout ) . toContain ( pkgJSON . version ) ;
1010 expect ( stderr ) . toHaveLength ( 0 ) ;
1111 } ) ;
1212
1313 it ( 'outputs version with multiple commands' , ( ) => {
1414 const { stdout, stderr } = run ( __dirname , [ 'version' , 'init' ] ) ;
15- expect ( stdout ) . toContain ( pkgLock . version ) ;
15+ expect ( stdout ) . toContain ( pkgJSON . version ) ;
1616 expect ( stderr ) . toHaveLength ( 0 ) ;
1717 } ) ;
1818
1919 it ( 'does not output version with help command' , ( ) => {
2020 const { stdout, stderr } = run ( __dirname , [ 'version' , 'help' ] ) ;
21- expect ( stdout ) . not . toContain ( pkgLock . version ) ;
21+ expect ( stdout ) . not . toContain ( pkgJSON . version ) ;
2222
2323 const uniqueIdentifier = 'Made with ♥️ by the webpack team' ;
2424 expect ( stdout ) . toContain ( uniqueIdentifier ) ;
@@ -27,7 +27,7 @@ describe('version flag with multiple arguments', () => {
2727
2828 it ( 'does not output version with help dashed' , ( ) => {
2929 const { stdout, stderr } = run ( __dirname , [ 'version' , '--help' ] ) ;
30- expect ( stdout ) . not . toContain ( pkgLock . version ) ;
30+ expect ( stdout ) . not . toContain ( pkgJSON . version ) ;
3131
3232 const uniqueIdentifier = 'Made with ♥️ by the webpack team' ;
3333 expect ( stdout ) . toContain ( uniqueIdentifier ) ;
@@ -36,7 +36,7 @@ describe('version flag with multiple arguments', () => {
3636
3737 it ( 'outputs version with multiple dashed args and has precidence' , ( ) => {
3838 const { stdout, stderr } = run ( __dirname , [ '--target' , 'browser' , '--version' ] ) ;
39- expect ( stdout ) . toContain ( pkgLock . version ) ;
39+ expect ( stdout ) . toContain ( pkgJSON . version ) ;
4040 expect ( stderr ) . toHaveLength ( 0 ) ;
4141 } ) ;
4242} ) ;
0 commit comments