UNPKG

1.24 kBMarkdownView Raw
1---
2category: packages
3---
4
5## ui-test-utils
6
7[![npm][npm]][npm-url] 
8[![build-status][build-status]][build-status-url] 
9[![MIT License][license-badge]][LICENSE] 
10[![Code of Conduct][coc-badge]][coc]
11
12A UI testing library made by Instructure Inc.
13
14### Installation
15
16```sh
17yarn add @instructure/ui-test-utils
18```
19
20### Usage
21
22```javascript
23import { mount, expect, find } from '@instructure/ui-test-utils'
24
25import MyComponent from '../'
26
27it('should render children', async () => {
28 await mount(<MyComponent>Hello World</MyComponent>)
29 expect(await find(':contains(Hello World)')).to.exist()
30})
31```
32[npm]: https://img.shields.io/npm/v/@instructure/ui-test-utils.svg
33[npm-url]: https://npmjs.com/package/@instructure/ui-test-utils
34
35[build-status]: https://travis-ci.org/instructure/instructure-ui.svg?branch=master
36[build-status-url]: https://travis-ci.org/instructure/instructure-ui "Travis CI"
37
38[license-badge]: https://img.shields.io/npm/l/instructure-ui.svg?style=flat-square
39[license]: https://github.com/instructure/instructure-ui/blob/master/LICENSE
40
41[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
42[coc]: https://github.com/instructure/instructure-ui/blob/master/CODE_OF_CONDUCT.md