diff --git a/test/runtime/samples/lifecycle-events/_config.js b/test/runtime/samples/lifecycle-events/_config.js index 77290d513b..53bc4c4d88 100644 --- a/test/runtime/samples/lifecycle-events/_config.js +++ b/test/runtime/samples/lifecycle-events/_config.js @@ -1,7 +1,8 @@ export default { test({ assert, component }) { - assert.deepEqual(component.events, ['mount']); + const { events } = component; + assert.deepEqual(events, ['mount']); component.$destroy(); - assert.deepEqual(component.events, ['mount', 'destroy']); + assert.deepEqual(events, ['mount', 'destroy']); } }; diff --git a/test/runtime/samples/ondestroy-before-cleanup/Top.html b/test/runtime/samples/ondestroy-before-cleanup/Top.html index 7a023b75b6..a0a3549ef4 100644 --- a/test/runtime/samples/ondestroy-before-cleanup/Top.html +++ b/test/runtime/samples/ondestroy-before-cleanup/Top.html @@ -1,11 +1,11 @@ diff --git a/test/runtime/samples/ondestroy-before-cleanup/_config.js b/test/runtime/samples/ondestroy-before-cleanup/_config.js index 78fec33169..e9721f24b0 100644 --- a/test/runtime/samples/ondestroy-before-cleanup/_config.js +++ b/test/runtime/samples/ondestroy-before-cleanup/_config.js @@ -1,9 +1,13 @@ +import container from './container.js'; + export default { test({ assert, component, target }) { + container.div = null; + const top = component.top; const div = target.querySelector('div'); component.visible = false; - assert.equal(top.refOnDestroy, div); + assert.equal(container.div, div); } }; \ No newline at end of file diff --git a/test/runtime/samples/ondestroy-before-cleanup/container.js b/test/runtime/samples/ondestroy-before-cleanup/container.js new file mode 100644 index 0000000000..7c645e42fb --- /dev/null +++ b/test/runtime/samples/ondestroy-before-cleanup/container.js @@ -0,0 +1 @@ +export default {}; \ No newline at end of file diff --git a/test/runtime/samples/ondestroy-before-cleanup/main.html b/test/runtime/samples/ondestroy-before-cleanup/main.html index e7758c98f6..15da7a5cba 100644 --- a/test/runtime/samples/ondestroy-before-cleanup/main.html +++ b/test/runtime/samples/ondestroy-before-cleanup/main.html @@ -1,8 +1,7 @@