Skip to content

Commit

Permalink
fix sortBy changes + pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
jho44 committed Sep 18, 2022
1 parent 548babb commit 89d0e49
Show file tree
Hide file tree
Showing 135 changed files with 18,137 additions and 17,507 deletions.
10 changes: 4 additions & 6 deletions __tests__/CardsApi.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,10 @@ describe("CardsApi", () => {
}));

const cardsApi = await new CardsApi(CONFIG_FOR_UNIT).list(
1,
"fake",
"id",
{
id: "asc",
}
1, // limit
"fake", // before
"id", // after
["total_count"] // include
);
expect(cardsApi).toBeDefined();
expect(cardsApi.data?.length).toEqual(1);
Expand Down
50 changes: 0 additions & 50 deletions __tests__/MiscellaneousModels.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {
SortBy1,
SortBy2,
SortBy3,
SortBy4,
SortBy5,
SortByDateCreatedEnum,
SortBySendDateEnum,
SortBy1DateCreatedEnum,
Expand All @@ -19,10 +17,6 @@ import {
SortBy2SendDateEnum,
SortBy3DateCreatedEnum,
SortBy3SendDateEnum,
SortBy4DateCreatedEnum,
SortBy4SendDateEnum,
SortBy5DateCreatedEnum,
SortBy5SendDateEnum,
Thumbnail,
CountryExtended,
TrackingEventCertified,
Expand Down Expand Up @@ -576,50 +570,6 @@ describe("Sort Criteria", () => {
expect((rec as any)[prop]).toEqual(val);
});
});

describe("SortBy4", () => {
it("can be created", () => {
const rec = new SortBy4();
expect(rec).toBeDefined();
});

it.each([
["date_created", SortBy4DateCreatedEnum.Asc],
["date_created", SortBy4DateCreatedEnum.Desc],
["send_date", SortBy4SendDateEnum.Asc],
["send_date", SortBy4SendDateEnum.Desc],
])("can be created with a provided %s value", (prop, val) => {
const input = {};
(input as any)[prop] = val;

const rec = new SortBy4(input);

expect(rec).toBeDefined();
expect((rec as any)[prop]).toEqual(val);
});
});

describe("SortBy5", () => {
it("can be created", () => {
const rec = new SortBy5();
expect(rec).toBeDefined();
});

it.each([
["date_created", SortBy5DateCreatedEnum.Asc],
["date_created", SortBy5DateCreatedEnum.Desc],
["send_date", SortBy5SendDateEnum.Asc],
["send_date", SortBy5SendDateEnum.Desc],
])("can be created with a provided %s value", (prop, val) => {
const input = {};
(input as any)[prop] = val;

const rec = new SortBy5(input);

expect(rec).toBeDefined();
expect((rec as any)[prop]).toEqual(val);
});
});
});

describe("Location", () => {
Expand Down
Loading

0 comments on commit 89d0e49

Please sign in to comment.