Skip to content

Commit 625ebab

Browse files
committed
add test
1 parent 0987b3d commit 625ebab

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/delimiter.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,11 @@ describe('guessDelimiter', () => {
111111
const result = guessDelimiter(input)
112112
expect(result.bestDelimiter).toBe(',')
113113
})
114+
115+
it('should return unsuccessful when no delimiter is found', () => {
116+
const input = 'just some random text without delimiters\nanother line without delimiters'
117+
const result = guessDelimiter(input)
118+
expect(result.successful).toBe(false)
119+
expect(result.bestDelimiter).toBeUndefined()
120+
})
114121
})

0 commit comments

Comments
 (0)