Skip to content

Commit

Permalink
chore(release): release a major version to move to new npm org
Browse files Browse the repository at this point in the history
BREAKING CHANGE: You must switch from jest-native to @testing-library/jest-native
  • Loading branch information
Brandon Carroll committed May 30, 2019
1 parent 006f50a commit 3b9a62e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img
height="80"
width="80"
alt="goat"
alt="eagle"
src="https://raw.githubusercontent.com/testing-library/jest-native/master/other/eagle.png"
/>
</a>
Expand All @@ -17,9 +17,9 @@

[![Build Status](https://travis-ci.org/testing-library/jest-native.svg?branch=master)](https://travis-ci.org/testing-library/jest-native)
[![Code Coverage](https://img.shields.io/codecov/c/github/testing-library/jest-native.svg?style=flat-square)](https://codecov.io/github/testing-library/jest-native)
[![version](https://img.shields.io/npm/v/jest-native.svg?style=flat-square)](https://www.npmjs.com/package/jest-native)
[![downloads](https://img.shields.io/npm/dm/jest-native.svg?style=flat-square)](http://www.npmtrends.com/jest-native)
[![MIT License](https://img.shields.io/npm/l/jest-native.svg?style=flat-square)](https://github.com/testing-library/jest-native/blob/master/LICENSE)
[![version](https://img.shields.io/npm/v/@testing-library/jest-native.svg?style=flat-square)](https://www.npmjs.com/package/@testing-library/jest-native)
[![downloads](https://img.shields.io/npm/dm/@testing-library/jest-native.svg?style=flat-square)](http://www.npmtrends.com/@testing-library/jest-native)
[![MIT License](https://img.shields.io/npm/l/@testing-library/jest-native.svg?style=flat-square)](https://github.com/testing-library/jest-native/blob/master/LICENSE)

[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
Expand Down Expand Up @@ -77,27 +77,27 @@ with that library and its guiding principles first.
This module should be installed as one of your project's `devDependencies`:

```
npm install --save-dev jest-native
npm install --save-dev @testing-library/jest-native
```

You will need `native-testing-library`, `react`, and `react-native` installed in order to use this
package.

## Usage

Import `jest-native/extend-expect` once (for instance in your
Import `@testing-library/jest-native/extend-expect` once (for instance in your
[tests setup file](https://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string))
and you're good to go:

```javascript
import 'jest-native/extend-expect';
import '@testing-library/jest-native/extend-expect';
```

Alternatively, you can selectively import only the matchers you intend to use, and extend jest's
`expect` yourself:

```javascript
import { toBeEmpty, toHaveTextContent } from 'jest-native';
import { toBeEmpty, toHaveTextContent } from '@testing-library/jest-native';

expect.extend({ toBeEmpty, toHaveTextContent });
```
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "jest-native",
"name": "@testing-library/jest-native",
"version": "0.0.0-semantically-released",
"description": "Custom jest matchers to test the state of React Native",
"main": "dist/index.js",
Expand All @@ -23,7 +23,7 @@
],
"keywords": [
"testing",
"native-testing-library",
"testing-library",
"jest",
"react-native"
],
Expand All @@ -33,7 +33,6 @@
"jest-matcher-utils": "^24.0.0",
"ramda": "^0.26.1",
"pretty-format": "^24.0.0",
"react-test-renderer": "^16.8.0",
"redent": "^2.0.0"
},
"devDependencies": {
Expand All @@ -48,13 +47,15 @@
"native-testing-library": "^3.0.0",
"prettier": "^1.16.4",
"pretty-quick": "^1.10.0",
"react": "16.8.3",
"react-native": "^0.59.3",
"react": "16.8.6",
"react-native": "^0.59.6",
"react-test-renderer": "16.8.6",
"semantic-release": "^15.13.3"
},
"peerDependencies": {
"react": "*",
"react-native": ">0.55"
"react-native": "*",
"react-test-renderer": "*"
},
"husky": {
"hooks": {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/to-have-text-content.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Text } from 'react-native';
import { Text, View } from 'react-native';
import { render } from 'native-testing-library';

describe('.toHaveTextContent', () => {
Expand Down Expand Up @@ -52,9 +52,9 @@ describe('.toHaveTextContent', () => {
<Text testID="parent">
<Text>Step</Text>
<Text> 1 </Text>
<Text>
<View>
<Text> of </Text>
</Text>
</View>
4
</Text>,
);
Expand Down

0 comments on commit 3b9a62e

Please sign in to comment.