Skip to content

Commit 4c0d013

Browse files
[autofix.ci] apply automated fixes
1 parent 15aa50b commit 4c0d013

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

packages-private/dts-test/component.test-d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ describe('object props', () => {
198198
expectType<ExpectedProps['object']>(props.object)
199199

200200
// raw bindings
201-
expectType<Number>(rawBindings.setupA)
202-
expectType<Ref<Number>>(rawBindings.setupB)
203-
expectType<Ref<Number>>(rawBindings.setupC.a)
204-
expectType<Ref<Number> | undefined>(rawBindings.setupD)
201+
expectType<number>(rawBindings.setupA)
202+
expectType<Ref<number>>(rawBindings.setupB)
203+
expectType<Ref<number>>(rawBindings.setupC.a)
204+
expectType<Ref<number> | undefined>(rawBindings.setupD)
205205

206206
// raw bindings props
207207
expectType<ExpectedProps['a']>(rawBindings.setupProps.a)
@@ -223,9 +223,9 @@ describe('object props', () => {
223223
expectType<ExpectedProps['validated']>(rawBindings.setupProps.validated)
224224

225225
// setup
226-
expectType<Number>(setup.setupA)
227-
expectType<Number>(setup.setupB)
228-
expectType<Ref<Number>>(setup.setupC.a)
226+
expectType<number>(setup.setupA)
227+
expectType<number>(setup.setupB)
228+
expectType<Ref<number>>(setup.setupC.a)
229229
expectType<number | undefined>(setup.setupD)
230230

231231
// raw bindings props
@@ -354,10 +354,10 @@ describe('object props', () => {
354354
expectType<ExpectedProps['object']>(props.object)
355355

356356
// rawBindings
357-
expectType<Number>(rawBindings.setupA)
357+
expectType<number>(rawBindings.setupA)
358358

359359
//setup
360-
expectType<Number>(setup.setupA)
360+
expectType<number>(setup.setupA)
361361
})
362362
})
363363

packages/compiler-sfc/__tests__/compileTemplate.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ test('should generate the correct imports expression', () => {
395395
`,
396396
ssr: true,
397397
})
398-
expect(code).toMatch(`_ssrRenderAttr(\"src\", _imports_1)`)
399-
expect(code).toMatch(`_createVNode(\"img\", { src: _imports_1 })`)
398+
expect(code).toMatch(`_ssrRenderAttr("src", _imports_1)`)
399+
expect(code).toMatch(`_createVNode("img", { src: _imports_1 })`)
400400
})
401401

402402
// #3874

packages/compiler-ssr/__tests__/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function getCompiledString(src: string): string {
66
// but also means this util can only be used for non-root cases.
77
const { code } = compile(`<div>${src}</div>`)
88
const match = code.match(
9-
/_push\(\`<div\${\s*_ssrRenderAttrs\(_attrs\)\s*}>([^]*)<\/div>\`\)/,
9+
/_push\(`<div\${\s*_ssrRenderAttrs\(_attrs\)\s*}>([^]*)<\/div>`\)/,
1010
)
1111

1212
if (!match) {

packages/runtime-core/__tests__/helpers/useId.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function runOnClient(factory: TestCaseFactory) {
2828
async function runOnServer(factory: TestCaseFactory) {
2929
const [app, _] = await factory()
3030
return (await renderToString(app))
31-
.replace(/<!--[\[\]]-->/g, '') // remove fragment wrappers
31+
.replace(/<!--[[\]]-->/g, '') // remove fragment wrappers
3232
.trim()
3333
}
3434

packages/runtime-core/__tests__/rendererAttrsFallthrough.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ describe('attribute fallthrough', () => {
745745
toggle.value = true
746746
await nextTick()
747747
expect(root.innerHTML).toBe(
748-
`<!-- comment A --><span class=\"red\">Foo</span>`,
748+
`<!-- comment A --><span class="red">Foo</span>`,
749749
)
750750
})
751751

packages/runtime-dom/__tests__/customElement.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ describe('defineCustomElement', () => {
837837

838838
describe('styles', () => {
839839
function assertStyles(el: VueElement, css: string[]) {
840-
const styles = el.shadowRoot?.querySelectorAll('style')!
840+
const styles = el.shadowRoot?.querySelectorAll('style')
841841
expect(styles.length).toBe(css.length) // should not duplicate multiple copies from Bar
842842
for (let i = 0; i < css.length; i++) {
843843
expect(styles[i].textContent).toBe(css[i])
@@ -856,7 +856,7 @@ describe('defineCustomElement', () => {
856856
customElements.define('my-el-with-styles', Foo)
857857
container.innerHTML = `<my-el-with-styles></my-el-with-styles>`
858858
const el = container.childNodes[0] as VueElement
859-
const style = el.shadowRoot?.querySelector('style')!
859+
const style = el.shadowRoot?.querySelector('style')
860860
expect(style.textContent).toBe(`div { color: red; }`)
861861

862862
// hmr
@@ -953,7 +953,7 @@ describe('defineCustomElement', () => {
953953
customElements.define('my-el-with-nonce', Foo)
954954
container.innerHTML = `<my-el-with-nonce></my-el-with-nonce>`
955955
const el = container.childNodes[0] as VueElement
956-
const style = el.shadowRoot?.querySelector('style')!
956+
const style = el.shadowRoot?.querySelector('style')
957957
expect(style.getAttribute('nonce')).toBe('xxx')
958958
})
959959
})
@@ -1396,7 +1396,7 @@ describe('defineCustomElement', () => {
13961396
customElements.define('my-el-use-shadow-root', Foo)
13971397
container.innerHTML = `<my-el-use-shadow-root>`
13981398
const el = container.childNodes[0] as VueElement
1399-
const style = el.shadowRoot?.querySelector('style')!
1399+
const style = el.shadowRoot?.querySelector('style')
14001400
expect(style.textContent).toBe(`div { color: red; }`)
14011401
})
14021402
})

packages/server-renderer/__tests__/ssrDynamicComponent.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('ssr: dynamic component', () => {
3030
}),
3131
),
3232
).toBe(
33-
`<div><!--[--><div style=\"display:none;\"><!--[-->hi<!--]--></div><!--]--></div>`,
33+
`<div><!--[--><div style="display:none;"><!--[-->hi<!--]--></div><!--]--></div>`,
3434
)
3535
})
3636

0 commit comments

Comments
 (0)