Skip to content

Commit

Permalink
Support @testing-library/react v14 as peer dep (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikingair authored Sep 15, 2023
1 parent b435269 commit 2c6c329
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
12 changes: 12 additions & 0 deletions test-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.1] - 2023-09-15

### Fixed

- Support `@testing-library/react` v14 as peer dependency
6 changes: 5 additions & 1 deletion test-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
This is a test utility for [morfi](https://www.npmjs.com/package/morfi).

## Installation
```

```sh
npm i -D morfi-test-utils
pnpm add -D morfi-test-utils
```

## How-to

### Testing Forms

```tsx
import { render } from '@testing-library/react';
import { MorfiTestUtils } from 'morfi-test-utils';
Expand Down Expand Up @@ -60,6 +63,7 @@ it('interacts with my form', async () => {
```

### Testing Fields

```tsx
import { render, fireEvent } from '@testing-library/react';
import { MorfiTestUtils } from 'morfi-test-utils';
Expand Down
4 changes: 2 additions & 2 deletions test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "morfi-test-utils",
"version": "3.0.0",
"version": "3.0.1",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"types": "dist/index.d.ts",
Expand All @@ -19,7 +19,7 @@
"url": "https://github.com/fdc-viktor-luft/morfi/issues"
},
"peerDependencies": {
"@testing-library/react": "^13.3.0",
"@testing-library/react": ">= 13.3.0 < 15",
"morfi": "^2.0.0",
"react": ">= 18"
},
Expand Down

0 comments on commit 2c6c329

Please sign in to comment.