Skip to content

Commit 6db120c

Browse files
author
Kelly Selden
committed
supporting test modifications
1 parent 2231cc9 commit 6db120c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/tests.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const {
1313
assertCodemodRan
1414
} = require('./helpers/assertions');
1515
const manifest = require('../manifest');
16+
const run = require('ember-cli-update/src/run');
1617

1718
const codemods = Object.keys(manifest);
1819

@@ -83,6 +84,10 @@ describe('runs codemods', function() {
8384
runCodemods: true,
8485
async beforeMerge() {
8586
await _merge('local', tmpPath);
87+
88+
if (manifest[codemod].script) {
89+
await run('npm install', { cwd: tmpPath });
90+
}
8691
}
8792
});
8893

@@ -109,9 +114,14 @@ describe('runs codemods', function() {
109114
assertNoUnstaged(status);
110115
assertCodemodRan(status);
111116

117+
await fs.remove(path.join(tmpPath, 'package-lock.json'));
118+
112119
// file is indeterminent between OS's, so ignore
113120
await fs.remove(path.join(tmpPath, 'MODULE_REPORT.md'));
114121

122+
// remove dist and node_modules before fixture compare
123+
await run('git clean -fdX', { cwd: tmpPath });
124+
115125
let nodeVersion = 'latest-node';
116126
if (process.env.NODE_LTS) {
117127
nodeVersion = 'min-node';

0 commit comments

Comments
 (0)