Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement testing in React 0.14, 15, 16, add wallaby.js, use enzyme #984

Merged
merged 27 commits into from Aug 3, 2018
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a84f1e9
begin work
cellog Jul 25, 2018
a2efb5d
Fix tests in 0.14, 15, and 16
cellog Jul 25, 2018
ab6f165
remove 15.4, not really necessary and it requires a tweak to the inst…
cellog Jul 26, 2018
cf436c9
fix 2 major potential issues
cellog Jul 26, 2018
c974795
update contributing docs and add missing test:watch
cellog Jul 26, 2018
bfd167e
re-work to use subdirectories for testing specific react versions
cellog Jul 30, 2018
85f9a27
fully working! with merged coverage!
cellog Jul 30, 2018
4aef279
fix linting, remove unnecessary file
cellog Jul 31, 2018
9173e32
fix test:watch
cellog Jul 31, 2018
90388aa
fix travis tests to run in parallel for each version
cellog Jul 31, 2018
2a4fe9d
oops, didn't make travis run the CI test
cellog Jul 31, 2018
35ddbd5
sigh... npm syntax error
cellog Jul 31, 2018
a8249a8
speed up test suites by only installing the specific version needed
cellog Jul 31, 2018
283e12e
remove unused plugin
cellog Aug 1, 2018
2deaefc
simplify test script options in package.json
cellog Aug 1, 2018
9a9c7ff
simpler gitignore
cellog Aug 1, 2018
44e94f6
remove unnecessary coverage merging, codecov does that automagically
cellog Aug 1, 2018
e52b97b
simplify test running
cellog Aug 1, 2018
232030a
new docs on testing specific React versions
cellog Aug 1, 2018
94d0f3c
move scripts to test/, remove unused dep
cellog Aug 1, 2018
c2c62a3
revert unintentional cosmetic changes
cellog Aug 1, 2018
8a778a8
add default version for "npm test"
cellog Aug 1, 2018
42c4cd8
revert unintentional cosmetic changes to test import order
cellog Aug 1, 2018
1a6550a
restore the correct test renderer version
cellog Aug 1, 2018
6e38790
fix travis, add a note about the matrix needing update on adding a Re…
cellog Aug 1, 2018
dfe68f1
Add cross-spawn dependency
markerikson Aug 3, 2018
dc75723
Use cross-spawn for consistent NPM installations cross-platform
markerikson Aug 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .gitignore
Expand Up @@ -6,3 +6,17 @@ lib
.nyc_output
coverage
es
test/**/lcov.info
test/**/lcov-report
test/react/0.14/test/components/*.spec.js
test/react/0.14/test/utils/*.spec.js
test/react/15/test/components/*.spec.js
test/react/15/test/utils/*.spec.js
test/react/16.2/test/components/*.spec.js
test/react/16.2/test/utils/*.spec.js
test/react/16.3/test/components/*.spec.js
test/react/16.3/test/utils/*.spec.js
test/react/16.4/test/components/*.spec.js
test/react/16.4/test/utils/*.spec.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can wildcard this (test/react/*/test/**/*.spec.js) so you don't have to list every subdirectory out or maintain it with newer versions of React.

test/react/**/src
lcov.info
14 changes: 13 additions & 1 deletion .travis.yml
@@ -1,8 +1,20 @@
language: node_js
node_js:
- "8"
before_install:
- 'nvm install-latest-npm'
env:
global:
- TEST=true
matrix:
- REACT=0.14
- REACT=15
- REACT=16.2
- REACT=16.3
- REACT=16.4
sudo: false
script:
- npm run lint
- npm test
- npm run test:ci
after_success:
- npm run coverage
16 changes: 15 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -35,11 +35,25 @@ npm run build:umd:min

### Testing and Linting

To run the tests:
To run the tests in the latest React version:
```
npm run test
```

To run in explicit React versions (the number is the version, so `test:16.3` will run in React version `16.3`):
```
npm run test:16.4
npm run test:16.3
npm run test:16.2
npm run test:15
npm run test:14
```

To run tests in all supported React versions, `0.14`, `15`, `16.2`, `16.3`, `16.4`,
```
npm run test:all
```

To continuously watch and run tests, run the following:
```
npm run test:watch
Expand Down