UNPKG
react-cowsay
Version:
latest (0.1.0)
0.1.0
A react wrapper for cowsay-browser
github.com/foxxmd/react-cowsay
foxxmd/react-cowsay
react-cowsay
/
__tests__
/
index.test.js
14 lines
(9 loc)
•
275 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
React
from
'react'
;
import
{ shallow }
from
'enzyme'
;
import
Cowsay
from
'../src/index'
;
test
(
'Cowsay has text'
,
() =>
{
const
cowsay =
shallow
(
<
Cowsay
>
I am a cow
</
Cowsay
>
);
expect
(cowsay.
text
()).
toEqual
(expect.
stringContaining
(
'I am a cow'
)); });