fix(typo): correct test function name (#51423)

This commit is contained in:
Jony J 2024-10-30 10:57:53 +08:00 committed by GitHub
parent 8eee04b20f
commit 87eb378b78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ export type Options = {
nameCheckPathOnly?: boolean;
};
function baseText(doInject: boolean, component: string, options: Options = {}) {
function baseTest(doInject: boolean, component: string, options: Options = {}) {
const files = globSync(`./components/${component}/demo/*.tsx`).filter(
(file) => !file.includes('_semantic'),
);
@ -101,14 +101,14 @@ function baseText(doInject: boolean, component: string, options: Options = {}) {
* Inject Trigger to force open in test snapshots
*/
export function extendTest(component: string, options: Options = {}) {
baseText(true, component, options);
baseTest(true, component, options);
}
/**
* Test all the demo snapshots
*/
export default function demoTest(component: string, options: Options = {}) {
baseText(false, component, options);
baseTest(false, component, options);
// Test component name is match the kebab-case
const testName = test;