Skip to content

Commit

Permalink
supporting test modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Selden committed Nov 20, 2019
1 parent 647149d commit bdcb2b3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const {
assertCodemodRan
} = require('./helpers/assertions');
const manifest = require('../manifest');
const run = require('ember-cli-update/src/run');

const codemods = Object.keys(manifest);

Expand Down Expand Up @@ -83,6 +84,10 @@ describe('runs codemods', function() {
runCodemods: true,
async beforeMerge() {
await _merge('local', tmpPath);

if (manifest[codemod].script) {
await run('npm install', { cwd: tmpPath });
}
}
});

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

await fs.remove(path.join(tmpPath, 'package-lock.json'));

// file is indeterminent between OS's, so ignore
await fs.remove(path.join(tmpPath, 'MODULE_REPORT.md'));

// remove dist and node_modules before fixture compare
await run('git clean -fdX', { cwd: tmpPath });

let nodeVersion = 'latest-node';
if (process.env.NODE_LTS) {
nodeVersion = 'min-node';
Expand Down

0 comments on commit bdcb2b3

Please sign in to comment.