1 Star 0 Fork 6

aigouzz/tencentcloud-sdk-nodejs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sms.v20190711.test.js 4.54 KB
一键复制 编辑 原始数据 按行查看 历史
lylianchen 提交于 2020-09-30 10:28 +08:00 . feat(typescript): sdk 支持typescript
const expect = require("chai").expect
const tencentcloud = require("../../tencentcloud-sdk-nodejs")
const client = new tencentcloud.sms.v20190711.Client({
credential: {
secretId: process.env.secretId,
secretKey: process.env.secretKey,
},
region: "ap-shanghai",
profile: {
signMethod: "TC3-HMAC-SHA256",
httpProfile: {
reqMethod: "POST",
reqTimeout: 30,
endpoint: "cvm.ap-shanghai.tencentcloudapi.com",
},
},
})
describe("sms.v20190711.test.js", function () {
it("sms.v20190711.ModifySmsSign", async function () {
try {
const data = await client.ModifySmsSign({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.AddSmsSign", async function () {
try {
const data = await client.AddSmsSign({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.PullSmsSendStatus", async function () {
try {
const data = await client.PullSmsSendStatus({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.SendSms", async function () {
try {
const data = await client.SendSms({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.DeleteSmsTemplate", async function () {
try {
const data = await client.DeleteSmsTemplate({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.SmsPackagesStatistics", async function () {
try {
const data = await client.SmsPackagesStatistics({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.SendStatusStatistics", async function () {
try {
const data = await client.SendStatusStatistics({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.CallbackStatusStatistics", async function () {
try {
const data = await client.CallbackStatusStatistics({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.DescribeSmsTemplateList", async function () {
try {
const data = await client.DescribeSmsTemplateList({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.PullSmsReplyStatus", async function () {
try {
const data = await client.PullSmsReplyStatus({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.DescribeSmsSignList", async function () {
try {
const data = await client.DescribeSmsSignList({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.PullSmsSendStatusByPhoneNumber", async function () {
try {
const data = await client.PullSmsSendStatusByPhoneNumber({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.ModifySmsTemplate", async function () {
try {
const data = await client.ModifySmsTemplate({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.PullSmsReplyStatusByPhoneNumber", async function () {
try {
const data = await client.PullSmsReplyStatusByPhoneNumber({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.DeleteSmsSign", async function () {
try {
const data = await client.DeleteSmsSign({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
it("sms.v20190711.AddSmsTemplate", async function () {
try {
const data = await client.AddSmsTemplate({})
expect(data).to.be.ok
} catch(error) {
expect(error.requestId).to.be.ok
expect(error.code).to.be.ok
}
})
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aigouzz/tencentcloud-sdk-nodejs.git
git@gitee.com:aigouzz/tencentcloud-sdk-nodejs.git
aigouzz
tencentcloud-sdk-nodejs
tencentcloud-sdk-nodejs
master

搜索帮助