This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
() => ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,a=>(a^Math.random()*16>>a/4).toString(16)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, screen } from '@testing-library/react' | |
import { App } from './App' | |
test('Render the App component', () => { | |
render(<App />) | |
expect(screen.queryByText('Log In')).toBeNull() | |
expect(screen.findByText('Log In')).toBeInTheDocument() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => { | |
const [loggedIn, setLoggedIn] = useState(false) | |
useEffect(() => { | |
setTimeout(() => setLoggedIn(true), 1000) | |
}, []) | |
return ( | |
<button>{loggedIn ? "Log Out" : "Log In"}</button> | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, screen } from '@testing-library/react' | |
import { App } from './App' | |
test('Render the App component', () => { | |
render(<App />) | |
expect(screen.queryByText('Missing Element')).toBeNull() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, screen } from '@testing-library/react' | |
import { App } from './App' | |
test('Render the App component', () => { | |
render(<App />) | |
expect(screen.getByRole('button')).toBeInTheDocument() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, screen } from '@testing-library/react' | |
import { App } from './App' | |
test("Render the App component", () => { | |
render(<App />) | |
expect(screen.getByText("Give me cookies!")).toBeInTheDocument() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => <button>Give me cookies!</button> | |
export default App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render, screen } from '@testing-library/react' | |
import { App } from './App' | |
test("Render the App component", () => { | |
render(<App />) | |
screen.debug() | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from '@testing-library/react' | |
import { App } from './App' | |
test("Render the App component", () => { | |
render(<App />) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --request GET 'https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=15m' |