Skip to content

Commit

Permalink
fix: failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekep-Obasi committed Apr 20, 2024
1 parent c4d1a4d commit 44b1b0d
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { render, screen } from '@testing-library/react'
import '@testing-library/jest-dom'
import { render, screen, waitFor } from '@testing-library/react'
import React from 'react'
import { GraphBlueprint } from '../index'

jest.mock('../../../../../network/fetchSourcesData', () => ({
Expand All @@ -15,8 +15,10 @@ describe('GraphBlueprint', () => {
it('should display only one Custom node', async () => {
render(<GraphBlueprint />)

const customNodes = await screen.findAllByText('Custom')
await waitFor(async () => {
const customNodes = await screen.findAllByText('Custom')

expect(customNodes).toHaveLength(1)
expect(customNodes).toHaveLength(1)
})
})
})

0 comments on commit 44b1b0d

Please sign in to comment.