Skip to content

chore: Force tests to fail for testing purposes #3806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export const createCommitsTableData = ({ pages }: CommitsTableData) => {
bundleAnalysis = <p>{content}</p>
}

// making changes to test processing process
console.log('hello')

return {
name: (
<Title
Expand Down
6 changes: 4 additions & 2 deletions src/ui/TopBanner/TopBanner.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
)

const div = screen.getByTestId('top-banner-root')
expect(div).toBeInTheDocument()
// expect(div).toBeInTheDocument()
expect(div).not.toBeInTheDocument()

Check failure on line 36 in src/ui/TopBanner/TopBanner.test.tsx

View workflow job for this annotation

GitHub Actions / Test Runner #8 - Vitest

src/ui/TopBanner/TopBanner.test.tsx > TopBanner > rendering base banner with only content > default variant > has the correct background color

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <div class="h-fit w-full px-4 py-2 lg:inline-flex lg:min-h-[38px] bg-ds-gray-primary" data-testid="top-banner-root" > <div class="flex grow-0 items-center gap-1 pb-2 md:pb-0" > <span> Test warning banner </span> </div> </div> instead ❯ src/ui/TopBanner/TopBanner.test.tsx:36:25
expect(div).toHaveClass('bg-ds-gray-primary')
})

Expand All @@ -56,7 +57,8 @@
)

const text = screen.getByText('Test default banner')
expect(text).toBeInTheDocument()
// expect(text).toBeInTheDocument()
expect(text).not.toBeInTheDocument()

Check failure on line 61 in src/ui/TopBanner/TopBanner.test.tsx

View workflow job for this annotation

GitHub Actions / Test Runner #8 - Vitest

src/ui/TopBanner/TopBanner.test.tsx > TopBanner > rendering base banner with only content > default variant > renders text content

Error: expect(element).not.toBeInTheDocument() expected document not to contain element, found <span> Test default banner </span> instead ❯ src/ui/TopBanner/TopBanner.test.tsx:61:26
})
})

Expand Down
7 changes: 7 additions & 0 deletions src/ui/TopBanner/TopBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ const topBannerContext = z.object({
localStorageKey: z.string().optional(),
setHideBanner: z.function().args(z.boolean()).returns(z.void()),
})
// TESTING: changing lines to get coverage change
//
//
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const sampleFunction = () => {
return 'test'
}

type TopBannerContextValue = z.infer<typeof topBannerContext>

Expand Down
Loading