mirror of
https://github.com/zhangxiangliang/stock-api.git
synced 2025-01-24 06:50:23 +08:00
17 lines
501 B
TypeScript
17 lines
501 B
TypeScript
// Stock
|
|
import Netease from "../../../src/stocks/netease/api";
|
|
|
|
describe("【网易】股票代码接口", () => {
|
|
it("需要获取的股票代码", async () => {
|
|
await expect(new Netease().getStock("SH510500"))
|
|
.resolves
|
|
.toMatchObject({ code: "SH510500", name: "500ETF" });
|
|
});
|
|
|
|
it("需要获取的股票组代码", async () => {
|
|
await expect((new Netease()).getStocks(["SH510500"]))
|
|
.resolves
|
|
.toMatchObject([{ code: "SH510500", name: "500ETF" }]);
|
|
});
|
|
});
|