Skip to content

Commit

Permalink
chore: ops test case
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxdmm committed Sep 14, 2024
1 parent 0732d9d commit 91ae110
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/shared/__tests__/string.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { describe, expect, it } from 'vitest'
import { camelCase, capitalize, kebabCase, pascalCase } from '../src'

describe('string is ok', () => {
it('pascalCase', () => {
expect(pascalCase('toBeOrNot')).toMatchInlineSnapshot(`"ToBeOrNot"`)
})

it('camelCase', () => {
expect(camelCase('toBeOrNot')).toMatchInlineSnapshot(`"toBeOrNot"`)
})

it('kebabCase', () => {
expect(kebabCase('toBeOrNot')).toMatchInlineSnapshot(`"to-be-or-not"`)
})

it('capitalize', () => {
expect(capitalize('hello-aaa')).toMatchInlineSnapshot(`"Hello-aaa"`)
})
})

0 comments on commit 91ae110

Please sign in to comment.