We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faf6919 commit 66f2177Copy full SHA for 66f2177
test/test.js
@@ -74,8 +74,8 @@ function test (options, assert) {
74
}
75
const module = interopDefault(window.vueModule)
76
const instance = {}
77
- if (module.beforeCreate) {
78
- module.beforeCreate.call(instance)
+ if (module && module.beforeCreate) {
+ module.beforeCreate.forEach(hook => hook.call(instance))
79
80
assert(window, module, window.vueModule, instance)
81
@@ -519,7 +519,7 @@ describe('vue-loader', function () {
519
var output = requireFromString(code, './test.build.js')
520
var mockInstance = {}
521
522
- output.beforeCreate.call(mockInstance)
+ output.beforeCreate.forEach(hook => hook.call(mockInstance))
523
expect(mockInstance.style.red).to.exist
524
525
done()
0 commit comments