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:
@@ -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');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import {useState, useEffect} from 'react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function useDeferredState<T>(
|
||||
duration = 1000,
|
||||
|
Reference in New Issue
Block a user