Skip to content

Commit

Permalink
Meta file updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Sep 18, 2018
1 parent 78128d3 commit a92da35
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ sudo: false

language: node_js

node_js:
- 10
- 8
node_js: 8

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
Expand All @@ -15,3 +13,14 @@ cache:
directories:
- $HOME/.cache
- node_modules

jobs:
include:
- stage: test
script: yarn test --maxWorkers=2
- stage: test
node_js: 10
script: yarn test --maxWorkers=2
- stage: code coverage
install: yarn add --dev coveralls
script: yarn test --maxWorkers=2 --coverage --coverageReporters=text-lcov | coveralls
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"jest": "jest",
"prebuild": "yarn clean",
"pretest": "yarn build",
"preversion": "yarn build",
"test": "yarn jest",
"version": "write-changelog"
},
Expand All @@ -35,7 +36,7 @@
"react-testing-library": "^5.0.1"
},
"peerDependencies": {
"reason-react": "^0.4.0 || ^0.3.0"
"reason-react": "< 0.6.0"
},
"devDependencies": {
"bs-jest": "^0.3.2",
Expand Down
32 changes: 16 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status][travis-image]][travis-url]
[![npm][npm-image]][npm-url]
[![Coveralls][coveralls-image]][coveralls-url]

> [BuckleScript](//github.com/BuckleScript/bucklescript) bindings for [react-testing-library](//github.com/kentcdodds/react-testing-library).
Expand All @@ -27,27 +28,23 @@ $ npm install --save-dev bs-react-testing-library
}
```

#### With [`bs-jest`](//github.com/reasonml-community/bs-jest)
#### With [`bs-jest`](//github.com/glennsl/bs-jest)

```ocaml
/* Component_test.re */
open Jest;
describe("Component", () => {
open Expect;
test("renders", () => {
(
<div style=ReactDOMRe.Style.make(~color="rebeccapurple", ())>
<h1> {ReasonReact.string("Heading")} </h1>
</div>
)
|> render
|> expect
|> toMatchSnapshot;
});
});
open Expect;
open ReactTestingLibrary;
test("Component renders", () =>
<div style=ReactDOMRe.Style.make(~color="rebeccapurple", ())>
<h1> {ReasonReact.string("Heading")} </h1>
</div>
|> render
|> expect
|> toMatchSnapshot
);
```

## Examples
Expand Down Expand Up @@ -93,3 +90,6 @@ MIT © [Neil Kistner](https://neilkistner.com)

[npm-image]: https://img.shields.io/npm/v/bs-react-testing-library.svg?style=flat-square
[npm-url]: https://npm.im/bs-react-testing-library

[coveralls-image]: https://img.shields.io/coveralls/github/wyze/bs-react-testing-library.svg?style=flat-square
[coveralls-url]: https://coveralls.io/github/wyze/bs-react-testing-library

0 comments on commit a92da35

Please sign in to comment.