<message>For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com</message>
</error>
`
constBLOCKED_TEXT_EN=[
'For account security, newly registered WeChat accounts are unable to log in to Web WeChat.',
' To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com',
].join('')
test('not blocked',asynct=>{
constprofile=newProfile()
constbridge=newBridge({profile})
try{
awaitbridge.testBlockedMessage('this is not xml')
t.pass('should not throw when no block message')
}catch(e){
t.fail('should throw when no block message')
}
})
test('zh',asynct=>{
constprofile=newProfile()
constbridge=newBridge({profile})
try{
awaitbridge.testBlockedMessage(BLOCKED_XML_ZH)
t.fail('should throw exception')
}catch(e){
t.equal(e.message,BLOCKED_TEXT_ZH,'should get zh blocked message')
}
})
test('en',asynct=>{
constprofile=newProfile()
constbridge=newBridge({profile})
try{
awaitbridge.testBlockedMessage(BLOCKED_XML_EN)
t.fail('should throw exception')
}catch(e){
t.equal(e.message,BLOCKED_TEXT_EN,'should get en blocked message')