File tree Expand file tree Collapse file tree 3 files changed +30
-20
lines changed Expand file tree Collapse file tree 3 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ sudo: false
22
33language : node_js
44
5- node_js :
6- - 10
7- - 8
5+ node_js : 8
86
97before_install :
108 - curl -o- -L https://yarnpkg.com/install.sh | bash
@@ -15,3 +13,14 @@ cache:
1513 directories :
1614 - $HOME/.cache
1715 - node_modules
16+
17+ jobs :
18+ include :
19+ - stage : test
20+ script : yarn test --maxWorkers=2
21+ - stage : test
22+ node_js : 10
23+ script : yarn test --maxWorkers=2
24+ - stage : code coverage
25+ install : yarn add --dev coveralls
26+ script : yarn test --maxWorkers=2 --coverage --coverageReporters=text-lcov | coveralls
Original file line number Diff line number Diff line change 2222 "jest" : " jest" ,
2323 "prebuild" : " yarn clean" ,
2424 "pretest" : " yarn build" ,
25+ "preversion" : " yarn build" ,
2526 "test" : " yarn jest" ,
2627 "version" : " write-changelog"
2728 },
3536 "react-testing-library" : " ^5.0.1"
3637 },
3738 "peerDependencies" : {
38- "reason-react" : " ^0.4.0 || ^0.3 .0"
39+ "reason-react" : " < 0.6 .0"
3940 },
4041 "devDependencies" : {
4142 "bs-jest" : " ^0.3.2" ,
Original file line number Diff line number Diff line change 22
33[ ![ Build Status] [ travis-image ]] [ travis-url ]
44[ ![ npm] [ npm-image ]] [ npm-url ]
5+ [ ![ Coveralls] [ coveralls-image ]] [ coveralls-url ]
56
67> [ BuckleScript] ( //github.com/BuckleScript/bucklescript ) bindings for [ react-testing-library] ( //github.com/kentcdodds/react-testing-library ) .
78
@@ -27,27 +28,23 @@ $ npm install --save-dev bs-react-testing-library
2728}
2829```
2930
30- #### With [ ` bs-jest ` ] ( //github.com/reasonml-community /bs-jest )
31+ #### With [ ` bs-jest ` ] ( //github.com/glennsl /bs-jest )
3132
3233``` ocaml
3334/* Component_test.re */
3435
3536open Jest;
36-
37- describe("Component", () => {
38- open Expect;
39-
40- test("renders", () => {
41- (
42- <div style=ReactDOMRe.Style.make(~color="rebeccapurple", ())>
43- <h1> {ReasonReact.string("Heading")} </h1>
44- </div>
45- )
46- |> render
47- |> expect
48- |> toMatchSnapshot;
49- });
50- });
37+ open Expect;
38+ open ReactTestingLibrary;
39+
40+ test("Component renders", () =>
41+ <div style=ReactDOMRe.Style.make(~color="rebeccapurple", ())>
42+ <h1> {ReasonReact.string("Heading")} </h1>
43+ </div>
44+ |> render
45+ |> expect
46+ |> toMatchSnapshot
47+ );
5148```
5249
5350## Examples
@@ -93,3 +90,6 @@ MIT © [Neil Kistner](https://neilkistner.com)
9390
9491[ npm-image ] : https://img.shields.io/npm/v/bs-react-testing-library.svg?style=flat-square
9592[ npm-url ] : https://npm.im/bs-react-testing-library
93+
94+ [ coveralls-image ] : https://img.shields.io/coveralls/github/wyze/bs-react-testing-library.svg?style=flat-square
95+ [ coveralls-url ] : https://coveralls.io/github/wyze/bs-react-testing-library
You can’t perform that action at this time.
0 commit comments