File tree 3 files changed +30
-20
lines changed
3 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ sudo: false
2
2
3
3
language : node_js
4
4
5
- node_js :
6
- - 10
7
- - 8
5
+ node_js : 8
8
6
9
7
before_install :
10
8
- curl -o- -L https://yarnpkg.com/install.sh | bash
@@ -15,3 +13,14 @@ cache:
15
13
directories :
16
14
- $HOME/.cache
17
15
- 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 22
22
"jest" : " jest" ,
23
23
"prebuild" : " yarn clean" ,
24
24
"pretest" : " yarn build" ,
25
+ "preversion" : " yarn build" ,
25
26
"test" : " yarn jest" ,
26
27
"version" : " write-changelog"
27
28
},
35
36
"react-testing-library" : " ^5.0.1"
36
37
},
37
38
"peerDependencies" : {
38
- "reason-react" : " ^0.4.0 || ^0.3 .0"
39
+ "reason-react" : " < 0.6 .0"
39
40
},
40
41
"devDependencies" : {
41
42
"bs-jest" : " ^0.3.2" ,
Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Build Status] [ travis-image ]] [ travis-url ]
4
4
[ ![ npm] [ npm-image ]] [ npm-url ]
5
+ [ ![ Coveralls] [ coveralls-image ]] [ coveralls-url ]
5
6
6
7
> [ BuckleScript] ( //github.com/BuckleScript/bucklescript ) bindings for [ react-testing-library] ( //github.com/kentcdodds/react-testing-library ) .
7
8
@@ -27,27 +28,23 @@ $ npm install --save-dev bs-react-testing-library
27
28
}
28
29
```
29
30
30
- #### With [ ` bs-jest ` ] ( //github.com/reasonml-community /bs-jest )
31
+ #### With [ ` bs-jest ` ] ( //github.com/glennsl /bs-jest )
31
32
32
33
``` ocaml
33
34
/* Component_test.re */
34
35
35
36
open 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
+ );
51
48
```
52
49
53
50
## Examples
@@ -93,3 +90,6 @@ MIT © [Neil Kistner](https://neilkistner.com)
93
90
94
91
[ npm-image ] : https://img.shields.io/npm/v/bs-react-testing-library.svg?style=flat-square
95
92
[ 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