test api
This commit is contained in:
@@ -25,7 +25,7 @@ export class UmbTestControllerImplementationElement extends UmbBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
describe('UmbContextProvider', () => {
|
||||
describe('UmbController', () => {
|
||||
type NewType = UmbControllerHostElement;
|
||||
|
||||
let hostElement: NewType;
|
||||
@@ -34,6 +34,26 @@ describe('UmbContextProvider', () => {
|
||||
hostElement = document.createElement('test-my-controller-host') as UmbControllerHostElement;
|
||||
});
|
||||
|
||||
describe('Public API', () => {
|
||||
describe('methods', () => {
|
||||
it('has an getElement method', () => {
|
||||
expect(hostElement).to.have.property('getElement').that.is.a('function');
|
||||
});
|
||||
|
||||
/*
|
||||
hasController(controller: UmbController): boolean;
|
||||
getControllers(filterMethod: (ctrl: UmbController) => boolean): UmbController[];
|
||||
addController(controller: UmbController): void;
|
||||
removeControllerByAlias(unique: UmbController['controllerAlias']): void;
|
||||
removeController(controller: UmbController): void;
|
||||
|
||||
hostConnected(): void;
|
||||
hostDisconnected(): void;
|
||||
destroy(): void;
|
||||
*/
|
||||
});
|
||||
});
|
||||
|
||||
describe('Controllers lifecycle', () => {
|
||||
it('controller is removed from host when destroyed', () => {
|
||||
const ctrl = new UmbTestControllerImplementationElement(hostElement, 'my-test-context');
|
||||
|
||||
Reference in New Issue
Block a user