Skip to content

Commit

Permalink
Fix Order Test Side (#911)
Browse files Browse the repository at this point in the history
* Fix Order Test Side

* fix lint
  • Loading branch information
montasaurus authored Mar 31, 2023
1 parent 7f936e8 commit c2b2453
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/__tests__/api/getOrders.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import "../support/setup";
import { expect } from "chai";
import { suite, test } from "mocha";
import { OrderSide } from "src/orders/types";
import { BAYC_CONTRACT_ADDRESS, BAYC_TOKEN_IDS, mainApi } from "../constants";
import { expectValidOrder } from "../utils";

suite("Getting orders", () => {
["ask", "bid"].forEach((side) => {
[<OrderSide>"ask", <OrderSide>"bid"].forEach((side) => {
test(`getOrder should return a single order > ${side}`, async () => {
const order = await mainApi.getOrder({
protocol: "seaport",
side: "ask",
side,
});
expectValidOrder(order);
});
Expand All @@ -27,11 +28,11 @@ suite("Getting orders", () => {
.and.have.property("message", "Not found: no matching order found");
});

["ask", "bid"].forEach((side) => {
[<OrderSide>"ask", <OrderSide>"bid"].forEach((side) => {
test(`getOrders should return a list of orders > ${side}`, async () => {
const { orders, next, previous } = await mainApi.getOrders({
protocol: "seaport",
side: "ask",
side,
tokenIds: BAYC_TOKEN_IDS,
assetContractAddress: BAYC_CONTRACT_ADDRESS,
});
Expand Down

0 comments on commit c2b2453

Please sign in to comment.