stringPascalCase (#1168)

This commit is contained in:
Jaco
2021-11-08 08:03:04 +02:00
committed by GitHub
parent d19713f548
commit 3ac567e1c4
5 changed files with 43 additions and 4 deletions
@@ -0,0 +1,18 @@
// Copyright 2017-2021 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { stringPascalCase } from '.';
describe('stringPascalCase', (): void => {
it('works correctly', (): void => {
expect(
stringPascalCase('Snake_case-something spaced')
).toBe('SnakeCaseSomethingSpaced');
});
it('works correctly for String (class)', (): void => {
expect(
stringPascalCase(String('foo_bar-baz'))
).toBe('FooBarBaz');
});
});