Sync built files (#17379)
as title, upload built files to local storage --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@@ -145,6 +145,7 @@ export { getGenericOperationName } from './sentry/getGenericOperationName';
|
||||
export { getHumanReadableNameFromCode } from './sentry/getHumanReadableNameFromCode';
|
||||
export { appendCopySuffix } from './strings/appendCopySuffix';
|
||||
export { capitalize } from './strings/capitalize';
|
||||
export { pascalCase } from './strings/pascalCase';
|
||||
export { uncapitalize } from './strings/uncapitalize';
|
||||
export type {
|
||||
TipTapMarkType,
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import { pascalCase } from '@/utils/strings/pascalCase';
|
||||
|
||||
describe('pascalCase', () => {
|
||||
it('converts a string to pascal case', () => {
|
||||
// Given
|
||||
const input = 'HELLO_WORLD';
|
||||
|
||||
// When
|
||||
const result = pascalCase(input);
|
||||
|
||||
// Then
|
||||
expect(result).toBe('HelloWorld');
|
||||
});
|
||||
|
||||
it('handles empty strings', () => {
|
||||
// Given
|
||||
const input = '';
|
||||
|
||||
// When
|
||||
const result = pascalCase(input);
|
||||
|
||||
// Then
|
||||
expect(result).toBe('');
|
||||
});
|
||||
|
||||
it('handles strings with only one word', () => {
|
||||
// Given
|
||||
const input = 'hello';
|
||||
|
||||
// When
|
||||
const result = pascalCase(input);
|
||||
|
||||
// Then
|
||||
expect(result).toBe('Hello');
|
||||
});
|
||||
|
||||
it('handles strings with several words, spaces and special characters', () => {
|
||||
// Given
|
||||
const input = '& Hello world! How are you today? #';
|
||||
|
||||
// When
|
||||
const result = pascalCase(input);
|
||||
|
||||
// Then
|
||||
expect(result).toBe('HelloWorldHowAreYouToday');
|
||||
});
|
||||
|
||||
it('handles strings with leading and trailing spaces', () => {
|
||||
// Given
|
||||
const input = ' hello_world ';
|
||||
|
||||
// When
|
||||
const result = pascalCase(input);
|
||||
|
||||
// Then
|
||||
expect(result).toBe('HelloWorld');
|
||||
});
|
||||
});
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from './appendCopySuffix';
|
||||
export * from './capitalize';
|
||||
export * from './pascalCase';
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
import camelCase from 'lodash.camelcase';
|
||||
import { capitalize } from '@/utils';
|
||||
|
||||
export const pascalCase = (str: string) => capitalize(camelCase(str));
|
||||
Reference in New Issue
Block a user