Skip to content

Commit

Permalink
[Tests] fix RENDERER override logic; allow currently failing “wrong…
Browse files Browse the repository at this point in the history
… renderer” tests to fail.
  • Loading branch information
ljharb committed Apr 5, 2019
1 parent 2d5f20f commit 3db6013
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Expand Up @@ -28,6 +28,8 @@ matrix:
env: REACT=16
- node_js: "lts/*"
env: REACT=16.8.5 RENDERER=16.8.5
- node_js: "lts/*"
env: REACT=16.8.5 RENDERER=16.8.3
- node_js: "lts/*"
env: REACT=16.8.3
- node_js: "lts/*"
Expand Down Expand Up @@ -65,6 +67,10 @@ matrix:
env: KARMA=true REACT=15
- node_js: "6"
env: KARMA=true REACT=16
- node_js: "lts/*"
env: REACT=16.8.5 RENDERER=16.8.3
- node_js: "lts/*"
env: REACT=16.8 RENDERER=16.7
exclude:
- node_js: "6"
env: REACT=0.13
Expand Down
7 changes: 4 additions & 3 deletions env.js
Expand Up @@ -129,19 +129,20 @@ Promise.resolve()
.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
adapterJson.dependencies['react-test-renderer'] = process.env.RENDERER;
}

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

return Promise.all([
return writeJSON(adapterPackageJsonPath, adapterJson, true).then(() => Promise.all([
// npm install the peer deps at the root
run('npm', 'i', '--no-save', ...installs),

// add the adapter to the dependencies of the test suite
writeJSON(testPackageJsonPath, testJson, true),
]);
]));
})
.then(() => run('lerna', 'bootstrap', '--hoist=\'react*\''))
.then(() => getJSON(testPackageJsonPath))
Expand Down

0 comments on commit 3db6013

Please sign in to comment.