Skip to content

Commit

Permalink
update test description
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgera committed Nov 1, 2023
1 parent 4878ee6 commit 7f53d1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/numberOrThrow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import numberOrThrow from '../src/numberOrThrow'
jest.spyOn(numberModule, 'default')
jest.spyOn(orThrowModule, 'default')

describe('numberOrThrow()', () => {
describe('.numberOrThrow()', () => {
const key = 'foo'
const originalEnv = process.env

Expand All @@ -22,13 +22,11 @@ describe('numberOrThrow()', () => {
expect(numberModule.default).toHaveBeenCalledWith(key)
})


it('reads "0" as 0', () => {
process.env[key] = '0'
expect(numberOrThrow(key)).toBe(0)
})


it('throws an error if a key is not defined', () => {
expect(() => numberOrThrow('undefined')).toThrow()
})
Expand Down

0 comments on commit 7f53d1c

Please sign in to comment.