chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { describe, it } from 'vitest';
|
||||
import { toCamelCase, toSnakeCase } from '~/casing';
|
||||
|
||||
describe.concurrent('casing', () => {
|
||||
it('transforms to snake case', ({ expect }) => {
|
||||
expect(toSnakeCase('drizzleKit')).toEqual('drizzle_kit');
|
||||
});
|
||||
|
||||
it('transforms an uppercase acronym/abbreviation to snake case', ({ expect }) => {
|
||||
expect(toSnakeCase('drizzleORM')).toEqual('drizzle_orm');
|
||||
});
|
||||
|
||||
it('transforms a camel case acronym/abbreviation to snake case', ({ expect }) => {
|
||||
expect(toSnakeCase('drizzleOrm')).toEqual('drizzle_orm');
|
||||
});
|
||||
|
||||
it('transforms an uppercase acronym/abbreviation followed by a word to snake case', ({ expect }) => {
|
||||
expect(toSnakeCase('drizzleORMAndKit')).toEqual('drizzle_orm_and_kit');
|
||||
});
|
||||
|
||||
it('transforms a camel case acronym/abbreviation followed by a word to snake case', ({ expect }) => {
|
||||
expect(toSnakeCase('drizzleOrmAndKit')).toEqual('drizzle_orm_and_kit');
|
||||
});
|
||||
|
||||
it('transforms to camel case 1', ({ expect }) => {
|
||||
expect(toCamelCase('drizzle_kit')).toEqual('drizzleKit');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user