instanceProxy.foo = 1
expect(instanceProxy.foo).toBe(1)
expect(instance!.ctx.foo).toBe(1)
+
+ // should also allow properties that start with $
+ const obj = (instanceProxy.$store = {})
+ expect(instanceProxy.$store).toBe(obj)
+ expect(instance!.ctx.$store).toBe(obj)
})
test('globalProperties', () => {
(cssModule = cssModule[key])
) {
return cssModule
+ } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
+ // user may set custom properties to `this` that start with `$`
+ accessCache![key] = AccessTypes.CONTEXT
+ return ctx[key]
} else if (
// global properties
((globalProperties = appContext.config.globalProperties),