@untemps/react-vocal
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -0,1 +1,3 @@ | ||
## [1.5.3](https://github.com/untemps/react-vocal/compare/v1.5.2...v1.5.3) (2020-12-26) | ||
## [1.5.2](https://github.com/untemps/react-vocal/compare/v1.5.1...v1.5.2) (2020-12-26) | ||
@@ -2,0 +4,0 @@ |
{ | ||
"name": "@untemps/react-vocal", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"author": "Vincent Le Badezet <v.lebadezet@untemps.net>", | ||
@@ -36,4 +36,4 @@ "repository": "git@github.com:untemps/react-vocal.git", | ||
"@rollup/plugin-babel": "^5.2.2", | ||
"@rollup/plugin-commonjs": "^12.0.0", | ||
"@rollup/plugin-node-resolve": "^8.0.0", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-node-resolve": "^11.0.1", | ||
"@semantic-release/changelog": "^5.0.1", | ||
@@ -44,3 +44,3 @@ "@semantic-release/git": "^9.0.0", | ||
"@testing-library/jest-dom": "^5.11.6", | ||
"@testing-library/react": "^10.0.4", | ||
"@testing-library/react": "^11.2.2", | ||
"@testing-library/react-hooks": "^3.7.0", | ||
@@ -55,8 +55,8 @@ "@untemps/event-dispatcher": "^1.1.0", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-test-renderer": "^16.13.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"react-test-renderer": "^17.0.1", | ||
"rollup": "^2.35.1", | ||
"rollup-plugin-filesize": "^9.1.0", | ||
"rollup-plugin-terser": "^6.1.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-visualizer": "^4.2.0", | ||
@@ -127,3 +127,3 @@ "semantic-release": "^17.3.0" | ||
"test": "jest -u --watch", | ||
"test:ci": "CI=true jest -u -b --coverage", | ||
"test:ci": "jest -u -b --ci --coverage", | ||
"build": "rm -rf dist && yarn build:cjs && yarn build:es && yarn build:umd", | ||
@@ -130,0 +130,0 @@ "build:cjs": "cross-env NODE_ENV=production BABEL_ENV=cjs rollup -c", |
@@ -66,2 +66,25 @@ import React from 'react' | ||
it('gets recognition status with custom children function', async () => { | ||
const onEnd = jest.fn() | ||
const { queryByText } = render( | ||
getInstance({ onEnd }, (start, stop, isStarted) => ( | ||
<div data-testid="__vocal-custom-root__"> | ||
<div>{isStarted ? 'Started' : 'Stopped'}</div> | ||
<button onClick={start}>start</button> | ||
<button onClick={stop}>stop</button> | ||
</div> | ||
)) | ||
) | ||
await act(async () => { | ||
fireEvent.click(queryByText('start')) | ||
await waitFor(() => { | ||
expect(queryByText('Started')).toBeInTheDocument() | ||
}) | ||
fireEvent.click(queryByText('stop')) | ||
await waitFor(() => { | ||
expect(queryByText('Stopped')).toBeInTheDocument() | ||
}) | ||
}) | ||
}) | ||
it('renders pointer cursor when idle', () => { | ||
@@ -68,0 +91,0 @@ const { getByTestId } = render(getInstance()) |
250087
1800