Skip to content

Commit 96409b0

Browse files
committed
chore: update test
1 parent b131da3 commit 96409b0

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444

4545
- name: Update npm
4646
run: npm install -g npm@latest
47-
if: ${{ inputs.publish }}
4847

4948
- name: Publish to NPM
5049
run: pnpm -r publish --access public --no-git-checks

packages/macros/tests/__snapshots__/fixtures.spec.ts.snap

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`defineComponent autoReturnFunction fixtures > ./fixtures/define-compone
55
import { useAttrs as __MACROS_useAttrs } from "vue";
66
import { useModel as __MACROS_useModel } from "/vue-jsx-vapor/macros/use-model";
77
import { useFullProps as __MACROS_useFullProps } from "vue-jsx-vapor";
8-
import { withAsyncContext as __MACROS_withAsyncContext } from "vue";import { defineComponent, defineVaporComponent, nextTick, unref } from 'vue'
8+
import { withAsyncContext as __MACROS_withAsyncContext } from "vue";import { defineComponent, defineVaporComponent, nextTick, unref, VaporComponentInstance, VNode } from 'vue'
99
1010
const $ = unref
1111
@@ -98,15 +98,25 @@ defineVaporComponent((__MACROS_props) => {
9898
'g': { default: foo, skipFactory: true },
9999
'h': { default: null },
100100
'i': { required: true, default: undefined }
101-
} })"
101+
} })
102+
103+
// #21
104+
const Comp3 = defineComponent(<T,>()=>{
105+
return () => <div>123</div>
106+
})
107+
;<Comp3 /> == ({} as VNode)
108+
const Comp4 = defineVaporComponent(<T,>() => {
109+
return () => <div>123</div>
110+
})
111+
;<Comp4 /> == ({} as VaporComponentInstance)"
102112
`;
103113

104114
exports[`fixtures > ./fixtures/define-component.tsx 1`] = `
105115
"
106116
import { useAttrs as __MACROS_useAttrs } from "vue";
107117
import { useModel as __MACROS_useModel } from "/vue-jsx-vapor/macros/use-model";
108118
import { useFullProps as __MACROS_useFullProps } from "vue-jsx-vapor";
109-
import { withAsyncContext as __MACROS_withAsyncContext } from "vue";import { defineComponent, defineVaporComponent, nextTick, unref } from 'vue'
119+
import { withAsyncContext as __MACROS_withAsyncContext } from "vue";import { defineComponent, defineVaporComponent, nextTick, unref, VaporComponentInstance, VNode } from 'vue'
110120
111121
const $ = unref
112122
@@ -199,7 +209,17 @@ defineVaporComponent((__MACROS_props) => {
199209
'g': { default: foo, skipFactory: true },
200210
'h': { default: null },
201211
'i': { required: true, default: undefined }
202-
} })"
212+
} })
213+
214+
// #21
215+
const Comp3 = defineComponent(<T,>()=>{
216+
return () => <div>123</div>
217+
})
218+
;<Comp3 /> == ({} as VNode)
219+
const Comp4 = defineVaporComponent(<T,>() => {
220+
return <div>123</div>
221+
})
222+
;<Comp4 /> == ({} as VaporComponentInstance)"
203223
`;
204224

205225
exports[`fixtures > ./fixtures/define-expose.tsx 1`] = `

0 commit comments

Comments
 (0)