Skip to content

Commit 66f2177

Browse files
committed
fix tests
1 parent faf6919 commit 66f2177

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ function test (options, assert) {
7474
}
7575
const module = interopDefault(window.vueModule)
7676
const instance = {}
77-
if (module.beforeCreate) {
78-
module.beforeCreate.call(instance)
77+
if (module && module.beforeCreate) {
78+
module.beforeCreate.forEach(hook => hook.call(instance))
7979
}
8080
assert(window, module, window.vueModule, instance)
8181
}
@@ -519,7 +519,7 @@ describe('vue-loader', function () {
519519
var output = requireFromString(code, './test.build.js')
520520
var mockInstance = {}
521521

522-
output.beforeCreate.call(mockInstance)
522+
output.beforeCreate.forEach(hook => hook.call(mockInstance))
523523
expect(mockInstance.style.red).to.exist
524524

525525
done()

0 commit comments

Comments
 (0)