Skip to content

Commit 03c2c6c

Browse files
committed
chore: remove duplicate test case
1 parent 85c5ec4 commit 03c2c6c

File tree

2 files changed

+0
-104
lines changed

2 files changed

+0
-104
lines changed

packages/compiler-sfc/__tests__/compileScript/__snapshots__/defineProps.spec.ts.snap

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -147,60 +147,6 @@ export default /*#__PURE__*/_defineComponent({
147147
148148
149149
150-
return { }
151-
}
152-
153-
})"
154-
`;
155-
156-
exports[`defineProps > w/ extends interface 2`] = `
157-
"import { defineComponent as _defineComponent } from 'vue'
158-
interface Bar extends Foo { y?: number }
159-
interface Props extends Bar {
160-
z: number
161-
y: string
162-
}
163-
164-
interface Foo { x?: number }
165-
166-
export default /*#__PURE__*/_defineComponent({
167-
props: {
168-
z: { type: Number, required: true },
169-
y: { type: String, required: true },
170-
x: { type: Number, required: false }
171-
},
172-
setup(__props: any, { expose: __expose }) {
173-
__expose();
174-
175-
176-
177-
return { }
178-
}
179-
180-
})"
181-
`;
182-
183-
exports[`defineProps > w/ extends intersection Type 1`] = `
184-
"import { defineComponent as _defineComponent } from 'vue'
185-
type Foo = {
186-
x?: number;
187-
};
188-
interface Props extends Foo {
189-
z: number
190-
y: string
191-
}
192-
193-
export default /*#__PURE__*/_defineComponent({
194-
props: {
195-
z: { type: Number, required: true },
196-
y: { type: String, required: true },
197-
x: { type: Number, required: false }
198-
},
199-
setup(__props: any, { expose: __expose }) {
200-
__expose();
201-
202-
203-
204150
return { }
205151
}
206152
@@ -263,31 +209,6 @@ export default /*#__PURE__*/_defineComponent({
263209
264210
265211
266-
return { }
267-
}
268-
269-
})"
270-
`;
271-
272-
exports[`defineProps > w/ intersection Type 1`] = `
273-
"import { defineComponent as _defineComponent } from 'vue'
274-
type Foo = {
275-
x?: number;
276-
};
277-
type Bar = {
278-
y: string;
279-
};
280-
281-
export default /*#__PURE__*/_defineComponent({
282-
props: {
283-
x: { type: Number, required: false },
284-
y: { type: String, required: true }
285-
},
286-
setup(__props: any, { expose: __expose }) {
287-
__expose();
288-
289-
290-
291212
return { }
292213
}
293214

packages/compiler-sfc/__tests__/compileScript/defineProps.spec.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -258,31 +258,6 @@ const props = defineProps({ foo: String })
258258
})
259259
})
260260

261-
test('w/ extends interface', () => {
262-
const { content, bindings } = compile(`
263-
<script lang="ts">
264-
interface Foo { x?: number }
265-
</script>
266-
<script setup lang="ts">
267-
interface Bar extends Foo { y?: number }
268-
interface Props extends Bar {
269-
z: number
270-
y: string
271-
}
272-
defineProps<Props>()
273-
</script>
274-
`)
275-
assertCode(content)
276-
expect(content).toMatch(`z: { type: Number, required: true }`)
277-
expect(content).toMatch(`y: { type: String, required: true }`)
278-
expect(content).toMatch(`x: { type: Number, required: false }`)
279-
expect(bindings).toStrictEqual({
280-
x: BindingTypes.PROPS,
281-
y: BindingTypes.PROPS,
282-
z: BindingTypes.PROPS
283-
})
284-
})
285-
286261
test('w/ extends intersection type', () => {
287262
const { content, bindings } = compile(`
288263
<script setup lang="ts">

0 commit comments

Comments
 (0)