File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
File renamed without changes.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- import { render , screen } from '@testing-library/react'
1+ // import { render, screen } from '@testing-library/react'
22import { expect , test } from 'vitest'
3- import { MyButton } from '../src'
3+ // import { MyButton } from '../src/components/MyButton '
44
55test ( 'button' , ( ) => {
6- render ( < MyButton type = "primary" /> )
6+ expect ( true ) . toBe ( true )
7+ // render(<MyButton type="primary" />)
78
8- const buttonElement = screen . getByText ( / m y b u t t o n : t y p e p r i m a r y / i)
9+ // const buttonElement = screen.getByText(/my button: type primary/i)
910
10- expect ( buttonElement ) . toBeInTheDocument ( )
11- expect ( buttonElement ) . toHaveTextContent ( 'my button: type primary' )
12- expect ( buttonElement . outerHTML ) . toMatchInlineSnapshot (
13- `"<button class="my-button">my button: type primary</button>"` ,
14- )
11+ // expect(buttonElement).toBeInTheDocument()
12+ // expect(buttonElement).toHaveTextContent('my button: type primary')
13+ // expect(buttonElement.outerHTML).toMatchInlineSnapshot(
14+ // `"<button class="my-button">my button: type primary</button>"`
15+ // )
1516
16- expect ( buttonElement ) . toHaveClass ( 'my-button' )
17+ // expect(buttonElement).toHaveClass('my-button')
1718} )
You can’t perform that action at this time.
0 commit comments