chore(ct-angular): lint

This commit is contained in:
Younes Jaaidi 2024-03-27 22:05:09 +01:00
parent 958e893786
commit 78596d9bad
No known key found for this signature in database
GPG key ID: 3126C5717BDF3241
3 changed files with 7 additions and 5 deletions

2
package-lock.json generated
View file

@ -8437,7 +8437,7 @@
},
"packages/playwright-ct-angular": {
"name": "@playwright/experimental-ct-angular",
"version": "1.42.0-next",
"version": "1.43.0-next",
"license": "Apache-2.0",
"dependencies": {
"@playwright/experimental-ct-core": "1.43.0-next"

View file

@ -1,10 +1,10 @@
{
"name": "@playwright/experimental-ct-angular",
"version": "1.42.0-next",
"version": "1.43.0-next",
"description": "Playwright Component Testing for Angular",
"repository": {
"type": "git",
"url": "git+https://github.com/sand4rt/playwright-ct-angular.git"
"url": "git+https://github.com/microsoft/playwright.git"
},
"homepage": "https://playwright.dev",
"engines": {

View file

@ -53,7 +53,8 @@ window.playwrightMount = async (component, rootElement, hooksConfig) => {
window.playwrightUnmount = async rootElement => {
const fixture = __pwFixtureRegistry.get(rootElement.id);
if (!fixture) throw new Error('Component was not mounted');
if (!fixture)
throw new Error('Component was not mounted');
/* Unsubscribe from all outputs. */
for (const subscription of Object.values(__pwOutputSubscriptionRegistry.get(fixture) ?? {}))
@ -130,7 +131,8 @@ async function __pwRenderComponent(component) {
* @param {ComponentInfo} componentInfo
*/
function __pwUpdateProps(fixture, componentInfo) {
if (!componentInfo.props) return;
if (!componentInfo.props)
return;
if (__pwIsTemplate(componentInfo)) {
Object.assign(fixture.componentInstance, componentInfo.props);