Skip to content

Commit

Permalink
test: add case for merge strat for beforeUnmount
Browse files Browse the repository at this point in the history
  • Loading branch information
laineus committed Aug 26, 2021
1 parent 88ecea9 commit 4681a79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/runtime-core/__tests__/apiOptions.spec.ts
Expand Up @@ -1266,15 +1266,19 @@ describe('api: options', () => {
test('this.$options[lifecycle-name]', () => {
const mixin = {
mounted() {},
beforeUnmount() {},
unmounted() {}
}
createApp({
mixins: [mixin],
mounted() {},
beforeUnmount() {},
unmounted() {},
created() {
expect(this.$options.mounted).toBeInstanceOf(Array)
expect(this.$options.mounted.length).toBe(2)
expect(this.$options.beforeUnmount).toBeInstanceOf(Array)
expect(this.$options.beforeUnmount.length).toBe(2)
expect(this.$options.unmounted).toBeInstanceOf(Array)
expect(this.$options.unmounted.length).toBe(2)
},
Expand Down

0 comments on commit 4681a79

Please sign in to comment.