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

chore(mp): add usingComponents tests (#3035)

上级 39f6c623
import {
addMiniProgramPageJson,
findChangedJsonFiles,
} from '../src/json/mp/jsonFile'
describe('miniProgram:jsonFile', () => {
const filename = 'pages/index/index'
test(`usingComponents`, () => {
const usingComponents = {
subscribe: 'plugin://subscribeMsg/subscribe',
demo: '/components/demo/demo',
}
addMiniProgramPageJson(filename, {
usingComponents,
})
expect(JSON.parse(findChangedJsonFiles().get(filename)!)).toEqual({
usingComponents: {
subscribe: 'plugin://subscribeMsg/subscribe',
demo: '../../components/demo/demo',
},
})
})
})
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册