1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

实现 连字符(脊柱式命名) Kebab Case / Spinal Case,驼峰脊柱式命名 Camel Kebab Case,连字符命名大写 Kebab Upper Case;完善测试用例;通过测试用例

This commit is contained in:
2024-04-03 23:54:38 +08:00
parent e7b62379c9
commit 723d9148b9
8 changed files with 261 additions and 17 deletions

View File

@@ -6,7 +6,7 @@ import * as vscode from 'vscode';
import testGroups from './test-case';
import { TestCase, TestCaseGroup } from '../type-definition/test-case-type';
import { transformMutliLineText, transformText } from '../main-code/variable-transform';
import { toCamelCase, toLowerCase, toPascalCase, toUpperCase } from '../main-code/variable-conversion';
import { toCamelCase, toCamelKebabCase, toKebabCase, toKebabUpperCase, toLowerCase, toPascalCase, toUpperCase } from '../main-code/variable-conversion';
import { TransformTextResult } from '../type-definition/variable-transform-type';
// import * as myExtension from '../../extension';
@@ -59,6 +59,9 @@ suite('Extension Test: run test case', () => {
if (testCase.output.lowerCase !== undefined) {
assert.strictEqual(testCase.output.lowerCase, toLowerCase(input, eol));
}
assert.strictEqual(testCase.output.kebabCase, toKebabCase(input, eol));
assert.strictEqual(testCase.output.camelkebabCase, toCamelKebabCase(input, eol));
assert.strictEqual(testCase.output.kebabUpperCase, toKebabUpperCase(input, eol));
}
}
});