mirror of
https://github.com/zhangxiangliang/stock-api.git
synced 2025-01-23 14:20:23 +08:00
feat: 增加 雪球股票代码接口测试相关
This commit is contained in:
parent
0715a5225e
commit
f17a9bc71e
@ -82,7 +82,6 @@ class Xueqiu extends Base {
|
||||
const data = (new XueqiuStockTransform(code, params.quote));
|
||||
return data.getStock();
|
||||
});
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user