Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Aug 1, 2024
1 parent 960f303 commit cc86b73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/makeDatasetSlugToReadableNameFilter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ describe('makeDatasetSlugToReadableNameFilter', () => {
expect(filter('unknown-slug')).toBe('unknown-slug')
})

it('logs an error if the provided slug is not found in the dataset name mapping', () => {
const loggerErrorSpy = vi.spyOn(logger, 'error')
it('logs an warn if the provided slug is not found in the dataset name mapping', () => {
const loggerWarningSpy = vi.spyOn(logger, 'warn')

filter('unknown-slug')

expect(loggerErrorSpy).toHaveBeenCalledTimes(1)
expect(loggerErrorSpy).toHaveBeenCalledWith('can\'t find a name for unknown-slug')
expect(loggerWarningSpy).toHaveBeenCalledTimes(1)
expect(loggerWarningSpy).toHaveBeenCalledWith('can\'t find a name for unknown-slug')
})
})

0 comments on commit cc86b73

Please sign in to comment.