feat: 增加 雪球股票代码接口测试相关

This commit is contained in:
zhangxiangliang 2020-08-03 01:41:35 +08:00
parent 0715a5225e
commit f17a9bc71e
2 changed files with 6 additions and 1 deletions

View File

@ -82,7 +82,6 @@ class Xueqiu extends Base {
const data = (new XueqiuStockTransform(code, params.quote));
return data.getStock();
});
return [];
}
}

View File

@ -2,6 +2,12 @@
const Xueqiu = require("stocks/xueqiu").default;
describe("【雪球】股票代码接口", () => {
it("获取 Token", async () => {
await expect(new Xueqiu().getToken())
.resolves
.toContain('xq_a_token');
});
it("需要获取的股票代码", async () => {
await expect(new Xueqiu().getStock("SH510500"))
.resolves