Skip to content

Commit

Permalink
test(#41): add defineEmits tests (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix-ru authored Nov 2, 2024
1 parent 3c1f1fa commit d03b02f
Show file tree
Hide file tree
Showing 7 changed files with 751 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export default {
render (_ctx, _cache, $props, $setup, $data, $options) {
return _toDisplayString(a);
},
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand All @@ -25,7 +26,8 @@ export default {
render (_ctx, _cache, $props, $setup, $data, $options) {
return _toDisplayString(a);
},
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand All @@ -42,7 +44,8 @@ export default {
render (_ctx, _cache, $props, $setup, $data, $options) {
return _toDisplayString(a);
},
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand All @@ -62,7 +65,8 @@ class dd {
import { x } from './x';
export default {
__name: "anonymous",
setup () {
setup (__props, { expose: __expose }) {
__expose();
let a = 1;
const b = 2;
function c() {}
Expand Down Expand Up @@ -110,7 +114,8 @@ import { x } from './x';
import { defineComponent as _defineComponent } from "vue";
export default _defineComponent({
__name: "anonymous",
setup () {
setup (__props, { expose: __expose }) {
__expose();
let a = 1;
const b = 2;
function c() {}
Expand Down Expand Up @@ -144,7 +149,8 @@ export default _defineComponent({
exports[`SFC genDefaultAs > <script setup> only 1`] = `
"const _sfc_ = {
__name: "anonymous",
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand All @@ -158,7 +164,8 @@ exports[`SFC genDefaultAs > <script setup> only w/ ts 1`] = `
"import { defineComponent as _defineComponent } from "vue";
const _sfc_ = _defineComponent({
__name: "anonymous",
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand All @@ -171,7 +178,8 @@ const _sfc_ = _defineComponent({
exports[`SFC genDefaultAs > <script> + <script setup> 1`] = `
"const _sfc_ = {
__name: "anonymous",
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand All @@ -185,7 +193,8 @@ exports[`SFC genDefaultAs > <script> + <script setup> w/ ts 1`] = `
"import { defineComponent as _defineComponent } from "vue";
const _sfc_ = _defineComponent({
__name: "anonymous",
setup () {
setup (__props, { expose: __expose }) {
__expose();
const a = 1;
return {
a
Expand Down
Loading

0 comments on commit d03b02f

Please sign in to comment.