st-cc
Version:
Stencil create component cli
19 lines • 814 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("./index");
describe('When using utils file', () => {
it('Should be able to convert component name', () => {
expect(index_1.convertComponentNameToComponentClassName('my-app')).toBe('MyApp');
});
it('Should return true if component name valid', () => {
const result = index_1.validateComponentName('x-x');
expect(result.SUCCESS).toBeTruthy();
expect(result.errorMessage).toBeUndefined();
});
it('Should return false if component name is invalid', () => {
const result = index_1.validateComponentName('x-x-');
expect(result.SUCCESS).toBeFalsy();
expect(result.errorMessage).toBeDefined();
});
});
//# sourceMappingURL=utils.spec.js.map