-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当调用render后再次调用render报错 #25
Comments
遇到了同样的问题,不知道什么时候解决? |
同复现了问题 |
初步定位是 |
请问是使用 jest 么?如果是 jest 的话,得用 |
一般 nodejs 中 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本号为:
"j-component":的版本号为:"^1.1.2",
"miniprogram-simulate": 的版本号为:"^1.0.1"
部分代码如下:
describe('badge render', () => {
it('default', () => {
const componentId =simulate.load('index', 'comp')
const component =simulate.render(componentId, {})
const parent = document.createElement('parent-wrapper')
component.attach(parent)
expect(component).toMatchSnapshot()
})
it('dot', () => {
const componentId = simulate.load('index', 'comp')
const component =simulate.render(componentId, {dot: true})
const parent = document.createElement('parent-wrapper-dot')
component.attach(parent)
expect(component).toMatchSnapshot()
})
})
结果为:
先调用一次render之后再调用render的时候,id为undefined,会报错。
The text was updated successfully, but these errors were encountered: