mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 23:50:08 +00:00
chore(lint): keep the fixes within the lint ratchets
No promise in a condition, sequential awaits through a reduce instead of a loop, no non-null assertions or any in the new tests, an awaited act, one options object for a stop edit and a handled rejection for the offline copy.
This commit is contained in:
@@ -29,10 +29,15 @@ describe('HelpGuideView: links', () => {
|
||||
})
|
||||
|
||||
it('takes an admin guide to the tab its settings sit under', () => {
|
||||
const { unmount } = render(<HelpGuideView guide={getHelpGuide('instance-keys')!} />)
|
||||
const guideOf = (id: string) => {
|
||||
const guide = getHelpGuide(id)
|
||||
if (!guide) throw new Error(`no guide ${id}`)
|
||||
return guide
|
||||
}
|
||||
const { unmount } = render(<HelpGuideView guide={guideOf('instance-keys')} />)
|
||||
expect(screen.getByRole('link', { name: /^Go to/ })).toHaveAttribute('href', '/admin?tab=services')
|
||||
unmount()
|
||||
render(<HelpGuideView guide={getHelpGuide('auth-methods')!} />)
|
||||
render(<HelpGuideView guide={guideOf('auth-methods')} />)
|
||||
expect(screen.getByRole('link', { name: /^Go to/ })).toHaveAttribute('href', '/admin?tab=settings')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user