Skip to content

Commit

Permalink
[Tests] properly install the right renderer version
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 19, 2019
1 parent 1cf510d commit ebdcce7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions env.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ Promise.resolve()
const peerDeps = adapterJson.peerDependencies;
const installs = Object.keys(peerDeps)
.filter(key => !key.startsWith('enzyme'))
.map((key) => {
const peerVersion = (key === 'react-test-renderer' && process.env.RENDERER) ? process.env.RENDERER : peerDeps[key];
return `${key}@${key.startsWith('react') ? reactVersion : peerVersion}`;
});
.map(key => `${key}@${key.startsWith('react') ? reactVersion : peerDeps[key]}`);

if (process.env.RENDERER) {
installs.push(`react-test-renderer@${process.env.RENDERER}`);
}

// eslint-disable-next-line no-param-reassign
testJson.dependencies[adapterName] = adapterJson.version;
Expand Down

0 comments on commit ebdcce7

Please sign in to comment.