* Adjust camelCase with simplified version
* Adjust count
* Adjust
* readability
* Ascii-only
* single-line callbacks
* CHANGELOG
* Dedupe string{Lower, Upper}First
* replacer -> fn
19 lines
497 B
TypeScript
19 lines
497 B
TypeScript
// 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 Bob'))
|
|
).toBe('FooBarBazBob');
|
|
});
|
|
});
|