Skip to content

Commit d80f241

Browse files
committed
chore: update utils test
1 parent f0f8cb6 commit d80f241

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/tests/utils.test.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
import { describe, it, expect } from 'vitest'
2-
import { getConfigValue, unquoteFromKeys, makeSdObject } from '../utils'
2+
import {
3+
addHyphen,
4+
getConfigValue,
5+
unquoteFromKeys,
6+
makeSdObject
7+
} from '../utils'
8+
9+
describe('addHyphen function', () => {
10+
it('should add hyphen if the string does not end with hyphen', () => {
11+
expect(addHyphen('hoge')).toEqual('hoge-')
12+
})
13+
14+
it('should not add hyphen if the string ends with hyphen', () => {
15+
expect(addHyphen('hoge-')).toEqual('hoge-')
16+
})
17+
})
318

419
describe('getConfigValue function', () => {
520
it('should return T if T is passed', () => {

0 commit comments

Comments
 (0)