mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
26 lines
697 B
TypeScript
26 lines
697 B
TypeScript
|
import * as vueShared from '@vue/shared'
|
||
|
import { describe, expect, it } from 'vitest'
|
||
|
import {
|
||
|
camelize,
|
||
|
capitalize,
|
||
|
escapeStringRegexp,
|
||
|
hyphenate,
|
||
|
kebabCase,
|
||
|
} from '..'
|
||
|
|
||
|
describe('strings', () => {
|
||
|
it('escapeStringRegexp should work', () => {
|
||
|
expect(escapeStringRegexp('foo')).toMatchInlineSnapshot('"foo"')
|
||
|
expect(escapeStringRegexp('**\\//aa^~#$')).toMatchInlineSnapshot(
|
||
|
'"\\\\*\\\\*\\\\\\\\//aa\\\\^~#\\\\$"'
|
||
|
)
|
||
|
})
|
||
|
|
||
|
it('re-export from @vue/shared', () => {
|
||
|
expect(camelize).toBe(vueShared.camelize)
|
||
|
expect(capitalize).toBe(vueShared.capitalize)
|
||
|
expect(hyphenate).toBe(vueShared.hyphenate)
|
||
|
expect(kebabCase).toBe(vueShared.hyphenate)
|
||
|
})
|
||
|
})
|