1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 18:08:11 +09:00

chore: emit source maps

This commit is contained in:
2020-06-29 12:24:01 +09:00
parent 71e24c9367
commit 1be3011bf7
12 changed files with 107 additions and 108 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import {render, waitFor} from '@testing-library/react';
import {useDeferredState} from './hooks';
import { render, waitFor } from '@testing-library/react';
import 'mutationobserver-shim';
import React from 'react';
import { useDeferredState } from './hooks';
const App: React.FC = () => {
const [value, setValue] = useDeferredState(500, 0);
@@ -14,7 +14,7 @@ const App: React.FC = () => {
};
it('provoke state flow after certain time passed', async () => {
const {getByTestId} = render(<App />);
const { getByTestId } = render(<App />);
expect(getByTestId('root').textContent).toBe('0');
await waitFor(() => {
expect(getByTestId('root').textContent).toBe('3');

View File

@@ -1,4 +1,4 @@
import {useState, useEffect} from 'react';
import { useEffect, useState } from 'react';
export function useDeferredState<T>(
duration = 1000,