Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
dskloetd committed Jul 17, 2024
1 parent ff25c1f commit 1572664
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions frontend/src/tests/lib/utils/projects.utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,9 @@ describe("project-utils", () => {
filterActiveProjects([
{
...mockSnsFullProject,
summary: mockSnsFullProject.summary.override({
swap: {
...mockSwap,
lifecycle: SnsSwapLifecycle.Pending,
},
}),
summary: mockSnsFullProject.summary.overrideLifecycle(
SnsSwapLifecycle.Pending
),
},
])?.length
).toEqual(0);
Expand Down Expand Up @@ -688,12 +685,9 @@ describe("project-utils", () => {
it("returns false if project committed", () => {
const project = {
...validProject,
summary: validProject.summary.override({
swap: {
...validProject.summary.swap,
lifecycle: SnsSwapLifecycle.Committed,
},
}),
summary: validProject.summary.overrideLifecycle(
SnsSwapLifecycle.Committed
),
};
const { valid } = validParticipation({
project,
Expand All @@ -708,12 +702,9 @@ describe("project-utils", () => {
it("returns false if project pending", () => {
const project = {
...validProject,
summary: validProject.summary.override({
swap: {
...validProject.summary.swap,
lifecycle: SnsSwapLifecycle.Pending,
},
}),
summary: validProject.summary.overrideLifecycle(
SnsSwapLifecycle.Pending
),
};
const { valid } = validParticipation({
project,
Expand Down Expand Up @@ -1040,12 +1031,9 @@ describe("project-utils", () => {
describe("participateButtonStatus", () => {
const summary = mockSnsFullProject.summary;

const notOpenSummary = mockSnsFullProject.summary.override({
swap: {
...mockSnsFullProject.summary.swap,
lifecycle: SnsSwapLifecycle.Committed,
},
});
const notOpenSummary = mockSnsFullProject.summary.overrideLifecycle(
SnsSwapLifecycle.Committed
);

const userNoCommitment: SnsSwapCommitment = {
rootCanisterId: mockSnsFullProject.rootCanisterId,
Expand Down

0 comments on commit 1572664

Please sign in to comment.