Skip to content

Commit ce86124

Browse files
fix tests
1 parent 1f52a61 commit ce86124

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

src/runtime/client-hydrate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const initializeClientHydrate = (
9090
attributes = {};
9191
}
9292

93-
hostRef.$instanceValues$.set(attributeName, attrValue);
93+
hostRef.$instanceValues$.set(memberName, attrValue);
9494
});
9595

9696
let scopeId: string;

test/wdio/complex-properties/cmp.test.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,18 @@ describe('complex-properties', () => {
4646
it('can change a complex property and see it updated correctly', async () => {
4747
const elm = document.querySelector('complex-properties') as HTMLComplexPropertiesElement;
4848
elm.foo = { bar: '456', loo: [4, 5, 6], qux: { quux: Symbol('new quux') } };
49+
elm.kidsNames.push('Jill');
4950
await expect(elm).toHaveText(
50-
expect.stringContaining([`this.foo.bar: 456`, `this.foo.loo: 4, 5, 6`, `this.foo.qux: symbol`].join('\n')),
51+
[
52+
`this.foo.bar: 456`,
53+
`this.foo.loo: 4, 5, 6`,
54+
`this.foo.qux: symbol`,
55+
`this.baz.get('foo'): symbol`,
56+
`this.quux.has('foo'): true`,
57+
`this.grault: true`,
58+
`this.waldo: true`,
59+
`this.kidsNames: John, Jane, Jim, Jill`,
60+
].join('\n'),
5161
);
5262
});
5363
});

test/wdio/complex-properties/cmp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class ComplexProperties {
6060
{`this.waldo`}: {this.waldo === null ? 'true' : 'false'}
6161
</li>
6262
<li>
63-
{`this.kidsNames`}: {this.kidsNames.join(', ')}
63+
{`this.kidsNames`}: {this.kidsNames?.join(', ')}
6464
</li>
6565
</ul>
6666
);

0 commit comments

Comments
 (0)