Skip to content

Commit 7d5f790

Browse files
jdaltonclaude
andcommitted
Improve env.ts test coverage to 100%
Add test for non-string, non-null values in envAsBoolean. This improves env.ts coverage from 93.33% to 100%. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4aee256 commit 7d5f790

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/registry/env.test.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,12 @@ describe('env module', () => {
143143
expect(envAsBoolean('yes')).toBe(false)
144144
expect(envAsBoolean('on')).toBe(false)
145145
})
146+
147+
it('should handle non-string, non-null values', () => {
148+
expect(envAsBoolean(1)).toBe(true)
149+
expect(envAsBoolean(0)).toBe(false)
150+
expect(envAsBoolean({})).toBe(true)
151+
expect(envAsBoolean([])).toBe(true)
152+
})
146153
})
147154
})

0 commit comments

Comments
 (0)