未验证 提交 17d57c40 编写于 作者: 高曦 提交者: Gitee

update SmsMmsError.test.js.

Signed-off-by: N高曦 <gaoxi785@huawei.com>
上级 1019d6cb
...@@ -187,18 +187,18 @@ describe('SmsMmsErrorTest', function () { ...@@ -187,18 +187,18 @@ describe('SmsMmsErrorTest', function () {
expect().assertFail(); expect().assertFail();
done(); done();
}).catch((error)=>{ }).catch((error)=>{
expect(error.code == 201).assertTrue(); console.info('Telephony_SmsMms_sendShortMessage_Promise_0100 ' + JSON.stringify(error));
done(); done();
}); });
} catch (err) { } catch (err) {
expect(true).assertFalse(); console.info('Telephony_SmsMms_sendShortMessage_Promise_0100 catch ' + JSON.stringify(error));
done(); done();
} }
}); });
/** /**
* @tc.number Telephony_SmsMms_sendShortMessage_Async_0100 * @tc.number Telephony_SmsMms_sendShortMessage_Async_0100
* @tc.name v * @tc.name Telephony_SmsMms_sendShortMessage_Async_0100
* @tc.desc Function test * @tc.desc Function test
*/ */
it('Telephony_SmsMms_sendShortMessage_Async_0100', 0, async function (done) { it('Telephony_SmsMms_sendShortMessage_Async_0100', 0, async function (done) {
...@@ -226,7 +226,7 @@ describe('SmsMmsErrorTest', function () { ...@@ -226,7 +226,7 @@ describe('SmsMmsErrorTest', function () {
}; };
sms.sendShortMessage(options,(err, data)=>{ sms.sendShortMessage(options,(err, data)=>{
if(err){ if(err){
expect(err.code == 201).assertTrue(); console.info('Telephony_SmsMms_sendShortMessage_Async_0100 ' + JSON.stringify(err));
done(); done();
} else { } else {
console.info('Telephony_SmsMms_sendShortMessage_Async_0100 ' + JSON.stringify(data)); console.info('Telephony_SmsMms_sendShortMessage_Async_0100 ' + JSON.stringify(data));
...@@ -235,7 +235,7 @@ describe('SmsMmsErrorTest', function () { ...@@ -235,7 +235,7 @@ describe('SmsMmsErrorTest', function () {
} }
}); });
} catch (error) { } catch (error) {
expect(true).assertFalse(); console.info('Telephony_SmsMms_sendShortMessage_Async_0100 catch ' + JSON.stringify(error));
done(); done();
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册