Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Pluggable<Instance = DOMWrapper<Node>> {
return handler(instance, options) // invoke the setup method passed to install
}
const bindProperty = ([property, value]: [string, any]) => {
// eslint-disable-next-line no-extra-semi
;(instance as any)[property] =
typeof value === 'function' ? value.bind(instance) : value
}
Expand Down
2 changes: 2 additions & 0 deletions src/createInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ export function createInstance(
}
// also intercept the proxy calls to make the mocks available on the instance
// (useful when a template access a global function like $t and the developer wants to mock it)
// eslint-disable-next-line no-extra-semi
;(this.$ as any).proxy = new Proxy((this.$ as any).proxy, {
get(target, key) {
if (key in global.mocks) {
Expand All @@ -243,6 +244,7 @@ export function createInstance(
for (const [k, v] of Object.entries(
global.mocks as { [key: string]: any }
)) {
// eslint-disable-next-line no-extra-semi
;(this as any)[k] = v
}
}
Expand Down