mirror of
https://github.com/zhangxiangliang/stock-api.git
synced 2025-02-03 07:00:47 +08:00
17 lines
485 B
TypeScript
17 lines
485 B
TypeScript
// Stock
|
|
const Sina = require("stocks/sina").default;
|
|
|
|
describe("【新浪】股票代码接口", () => {
|
|
it("需要获取的股票代码", async () => {
|
|
await expect(new Sina().getStock("SH510500"))
|
|
.resolves
|
|
.toMatchObject({ code: "SH510500", name: "500ETF" });
|
|
});
|
|
|
|
it("需要获取的股票组代码", async () => {
|
|
await expect((new Sina()).getStocks(["SH510500"]))
|
|
.resolves
|
|
.toMatchObject([{ code: "SH510500", name: "500ETF" }]);
|
|
});
|
|
});
|