You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
601 B
25 lines
601 B
3 years ago
|
'use strict'
|
||
|
|
||
|
const { test } = require('tap')
|
||
|
const toCamelCase = require('../lib/toCamelCase')
|
||
|
|
||
|
test('from kebab-case to camelCase', (t) => {
|
||
|
t.plan(1)
|
||
|
t.equal(toCamelCase('hello-world'), 'helloWorld')
|
||
|
})
|
||
|
|
||
|
test('from @-prefixed named imports', (t) => {
|
||
|
t.plan(1)
|
||
|
t.equal(toCamelCase('@hello/world'), 'helloWorld')
|
||
|
})
|
||
|
|
||
|
test('from @-prefixed named kebab-case to camelCase', (t) => {
|
||
|
t.plan(1)
|
||
|
t.equal(toCamelCase('@hello/my-world'), 'helloMyWorld')
|
||
|
})
|
||
|
|
||
|
test('from kebab-case to camelCase multiple words', (t) => {
|
||
|
t.plan(1)
|
||
|
t.equal(toCamelCase('hello-long-world'), 'helloLongWorld')
|
||
|
})
|