Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public [propertyChangedCallback](...args: unknown[]): void {
propertyChangedCallbackSpy(...args);
}
public [internalChangedCallback](...args: unknown[]): void {
internalChangedCallbackSpy(...args);
}
protected [render](): null {
return null;
}
}
await customElements.whenDefined(tag);
const test = fixtureSync(`<${tag}>`);
test.attributeChangedCallback('attr', 'old', 'new');
test[propertyChangedCallback]('attr', 'old', 'new');
test[internalChangedCallback]('attr', 'old', 'new');
await test.updateComplete;
expect(attributeChangedCallbackSpy).not.toHaveBeenCalled();
expect(propertyChangedCallbackSpy).not.toHaveBeenCalled();
expect(internalChangedCallbackSpy).not.toHaveBeenCalled();
// only during the connection
expect(schedulerSpy).toHaveBeenCalledTimes(1);
});
const createSimpleElement = (cls: Constructor): T => {
const tag = defineCE(cls);
return fixtureSync(`<${tag}>`);
};