import type { DropSuffix, PascalCaseAll, Reject, TupleOf } from './internals.js' import { pascalCaseAll, typeOf } from './internals.js' namespace Internals { type testPascalCaseAll1 = Expect< Equal, ['One', 'Two', 'Three']> > type testPascalCaseAll2 = Expect, string[]>> type testReject1 = Expect< Equal, ['one', 'two', 'three']> > type testDropSuffix1 = Expect< Equal, 'hello'> > type testDropSuffix2 = Expect, string>> type testDropSuffix3 = Expect, string>> type testTupleOf1 = Expect, [' ', ' ', ' ']>> } describe('typeOf', () => { test('null', () => { expect(typeOf(null)).toEqual('null') }) test('object', () => { expect(typeOf({})).toEqual('object') }) test('object', () => { expect(typeOf(['a', 'b', 'c'])).toEqual('array') }) test('string', () => { expect(typeOf('hello')).toEqual('string') }) }) describe('pascalCaseAll', () => { test('simple', () => { const result = pascalCaseAll(['one', 'two', 'three']) const expected = ['One', 'Two', 'Three'] expect(result).toEqual(expected) }) })