Skip to content

Commit d03740a

Browse files
committed
test: rename
1 parent b0bf19f commit d03740a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ defineOptions({ name: 'FooApp' })
188188
)
189189
})
190190

191-
it('should report an error with two defineProps', () => {
191+
it('should emit an error with two defineProps', () => {
192192
expect(() =>
193193
compile(`
194194
<script setup>
@@ -199,7 +199,7 @@ defineOptions({ name: 'FooApp' })
199199
).toThrowError('[@vue/compiler-sfc] duplicate defineOptions() call')
200200
})
201201

202-
it('should report an error with props or emits property', () => {
202+
it('should emit an error with props or emits property', () => {
203203
expect(() =>
204204
compile(`
205205
<script setup>
@@ -221,7 +221,7 @@ defineOptions({ name: 'FooApp' })
221221
)
222222
})
223223

224-
it('should report an error with type generic', () => {
224+
it('should emit an error with type generic', () => {
225225
expect(() =>
226226
compile(`
227227
<script setup lang="ts">

packages/compiler-sfc/src/compileScript.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,7 @@ export function compileScript(
12431243
if (decl.init) {
12441244
if (processDefineOptions(decl.init)) {
12451245
error(
1246-
`${DEFINE_OPTIONS}() A has no return value, ` +
1247-
`it cannot be assigned a value.`,
1246+
`${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`,
12481247
node
12491248
)
12501249
}

0 commit comments

Comments
 (0)