MCPcopy
hub / github.com/vuejs/core / mockElementWithStyle

Function mockElementWithStyle

packages/runtime-dom/__tests__/patchStyle.spec.ts:142–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140 // JSDOM doesn't support custom properties on style object so we have to
141 // mock it here.
142 function mockElementWithStyle() {
143 const store: any = {}
144 return {
145 style: {
146 display: '',
147 WebkitTransition: '',
148 setProperty(key: string, val: string) {
149 store[key] = val
150 },
151 getPropertyValue(key: string) {
152 return store[key]
153 },
154 },
155 }
156 }
157
158 it('CSS custom properties', () => {
159 const el = mockElementWithStyle()

Callers 1

patchStyle.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected