Skip to content

Commit a5e27eb

Browse files
author
Kelly Selden
committed
chore: supporting test modifications
1 parent 52487a0 commit a5e27eb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/tests.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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

1617
let manifest;
1718
let 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';

0 commit comments

Comments
 (0)