提交 4d8c4abf 编写于 作者: fxy060608's avatar fxy060608

wip(mp): tests

上级 74a43615
...@@ -7,11 +7,13 @@ function assert(template: string, templateCode: string, renderCode: string) { ...@@ -7,11 +7,13 @@ function assert(template: string, templateCode: string, renderCode: string) {
filename: 'foo.vue', filename: 'foo.vue',
prefixIdentifiers: true, prefixIdentifiers: true,
inline: true, inline: true,
miniProgram: {
emitFile({ source }) { emitFile({ source }) {
console.log(source) console.log(source)
// expect(source).toBe(templateCode) // expect(source).toBe(templateCode)
return '' return ''
}, },
},
}) })
// expect(res.template).toBe(templateCode) // expect(res.template).toBe(templateCode)
// expect(res.code).toBe(renderCode) // expect(res.code).toBe(renderCode)
......
...@@ -13,6 +13,7 @@ export function assert( ...@@ -13,6 +13,7 @@ export function assert(
filename: 'foo.vue', filename: 'foo.vue',
prefixIdentifiers: true, prefixIdentifiers: true,
inline: true, inline: true,
miniProgram: {
emitFile({ source }) { emitFile({ source }) {
// console.log(source) // console.log(source)
if (!options.onError) { if (!options.onError) {
...@@ -20,6 +21,7 @@ export function assert( ...@@ -20,6 +21,7 @@ export function assert(
} }
return '' return ''
}, },
},
...options, ...options,
}) })
// expect(res.template).toBe(templateCode) // expect(res.template).toBe(templateCode)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册