File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const {
1212 assertNoUnstaged,
1313 assertCodemodRan
1414} = require ( './helpers/assertions' ) ;
15+ const run = require ( 'ember-cli-update/src/run' ) ;
1516
1617let manifest ;
1718let fixturesPath ;
@@ -121,6 +122,10 @@ describe('runs codemods', function() {
121122 } = await merge ( {
122123 async beforeMerge ( ) {
123124 await _merge ( 'local' , tmpPath ) ;
125+
126+ if ( manifest [ codemod ] . script ) {
127+ await run ( 'npm install' , { cwd : tmpPath } ) ;
128+ }
124129 }
125130 } ) ;
126131
@@ -148,9 +153,14 @@ describe('runs codemods', function() {
148153 assertNoUnstaged ( status ) ;
149154 assertCodemodRan ( status ) ;
150155
156+ await fs . remove ( path . join ( tmpPath , 'package-lock.json' ) ) ;
157+
151158 // file is indeterminent between OS's, so ignore
152159 await fs . remove ( path . join ( tmpPath , 'MODULE_REPORT.md' ) ) ;
153160
161+ // remove dist and node_modules before fixture compare
162+ await run ( 'git clean -fdX' , { cwd : tmpPath } ) ;
163+
154164 let nodeVersion = 'latest-node' ;
155165 if ( process . env . NODE_LTS ) {
156166 nodeVersion = 'min-node' ;
You can’t perform that action at this time.
0 commit comments