|
|
@ -1,4 +1,3 @@
|
|
|
|
import { flushSync } from '../../../../src/index-client.js';
|
|
|
|
|
|
|
|
import { test } from '../../test';
|
|
|
|
import { test } from '../../test';
|
|
|
|
|
|
|
|
|
|
|
|
// Tests that default values only fire lazily when the prop is undefined, and every time
|
|
|
|
// Tests that default values only fire lazily when the prop is undefined, and every time
|
|
|
@ -13,24 +12,20 @@ export default test({
|
|
|
|
html: `<p>props: 0 0 0 0 1 1 1 1</p><p>log: nested.fallback_value,fallback_fn`,
|
|
|
|
html: `<p>props: 0 0 0 0 1 1 1 1</p><p>log: nested.fallback_value,fallback_fn`,
|
|
|
|
|
|
|
|
|
|
|
|
async test({ assert, target, component }) {
|
|
|
|
async test({ assert, target, component }) {
|
|
|
|
flushSync(() => {
|
|
|
|
component.p0 = undefined;
|
|
|
|
component.p0 = undefined;
|
|
|
|
component.p1 = undefined;
|
|
|
|
component.p1 = undefined;
|
|
|
|
component.p2 = undefined;
|
|
|
|
component.p2 = undefined;
|
|
|
|
component.p3 = undefined;
|
|
|
|
component.p3 = undefined;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert.htmlEqual(
|
|
|
|
assert.htmlEqual(
|
|
|
|
target.innerHTML,
|
|
|
|
target.innerHTML,
|
|
|
|
`<p>props: 1 1 1 1 1 1 1 1</p><p>log: nested.fallback_value,fallback_fn,nested.fallback_value,fallback_fn`
|
|
|
|
`<p>props: 1 1 1 1 1 1 1 1</p><p>log: nested.fallback_value,fallback_fn,nested.fallback_value,fallback_fn`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
flushSync(() => {
|
|
|
|
component.p4 = undefined;
|
|
|
|
component.p4 = undefined;
|
|
|
|
component.p5 = undefined;
|
|
|
|
component.p5 = undefined;
|
|
|
|
component.p6 = undefined;
|
|
|
|
component.p6 = undefined;
|
|
|
|
component.p7 = undefined;
|
|
|
|
component.p7 = undefined;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert.htmlEqual(
|
|
|
|
assert.htmlEqual(
|
|
|
|
target.innerHTML,
|
|
|
|
target.innerHTML,
|
|
|
|