Skip to content

Commit

Permalink
test: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jan 26, 2023
1 parent b0bf19f commit d03740a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/compiler-sfc/__tests__/compileScript.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ defineOptions({ name: 'FooApp' })
)
})

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

it('should report an error with props or emits property', () => {
it('should emit an error with props or emits property', () => {
expect(() =>
compile(`
<script setup>
Expand All @@ -221,7 +221,7 @@ defineOptions({ name: 'FooApp' })
)
})

it('should report an error with type generic', () => {
it('should emit an error with type generic', () => {
expect(() =>
compile(`
<script setup lang="ts">
Expand Down
3 changes: 1 addition & 2 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,7 @@ export function compileScript(
if (decl.init) {
if (processDefineOptions(decl.init)) {
error(
`${DEFINE_OPTIONS}() A has no return value, ` +
`it cannot be assigned a value.`,
`${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`,
node
)
}
Expand Down

0 comments on commit d03740a

Please sign in to comment.