Skip to content

Commit

Permalink
fix default pad test from typescript bump
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Jul 24, 2022
1 parent 2930f17 commit d1190b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/utilityFunctions/String.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ describe('padStart', () => {
exactly('barbarbarfoo', padStart('foo', 12, 'bar'))
})
test('default pad', () => {
exactly(' foo', padStart('foo', 5))
// the generic gets inferred incorrectly unless you define the variable first
// TODO: figure out whats going on with this. with each ts update this seems to happen more frequently
const result = padStart('foo', 5)
exactly(' foo', result)
})
test('string not known at compiletime', () => {
exactly<string>()(padStart('foo' as string, 6, 'ab'))
Expand Down

0 comments on commit d1190b5

Please sign in to comment.