Skip to content

Commit

Permalink
fix: remove debugging stuff from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus-Kuhn committed Sep 30, 2024
1 parent 5c28d0c commit 77d6e07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
7 changes: 2 additions & 5 deletions packages/runtime/test/consumption/requests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ describe("Requests", () => {
});
});

describe.only("Request expired due to expired RelationshipTemplate", () => {
describe("Request expired due to expired RelationshipTemplate", () => {
const runtimeServiceProvider = new RuntimeServiceProvider();
let sRuntimeServices: TestRuntimeServices;
let rRuntimeServices: TestRuntimeServices;
Expand Down Expand Up @@ -630,7 +630,6 @@ describe("Requests", () => {
afterAll(async () => await runtimeServiceProvider.stop());

test("change status of Request when querying it if the underlying RelationshipTemplate is expired", async () => {
// const templateContent = templateContent
const request = (await exchangeTemplateAndReceiverRequiresManualDecision(sRuntimeServices, rRuntimeServices, templateContent, DateTime.utc().plus({ seconds: 1 })))
.request;

Expand Down Expand Up @@ -684,9 +683,7 @@ describe("Requests", () => {
] as TestCase[])("Cannot respond to Request of expired RelationshipTemplate: $action Request throws error", ({ action }) => {
const actionLowerCase = action.toLowerCase() as "accept" | "reject";

test.only(`recipient: cannot ${actionLowerCase} incoming Request`, async () => {
// console.log(DateTime.utc());
// console.log(templateContent);
test(`recipient: cannot ${actionLowerCase} incoming Request`, async () => {
const request = (await exchangeTemplateAndReceiverRequiresManualDecision(sRuntimeServices, rRuntimeServices, templateContent, DateTime.utc().plus({ seconds: 1 })))
.request;

Expand Down
7 changes: 1 addition & 6 deletions packages/runtime/test/lib/testUtilsWithInactiveModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,16 @@ export async function exchangeTemplateAndReceiverRequiresManualDecision(
templateContent: any,
templateExpiresAt?: DateTime
): Promise<LocalRequestWithSource> {
console.log(templateContent);
const template = await exchangeTemplate(sRuntimeServices.transport, rRuntimeServices.transport, templateContent, templateExpiresAt);
// console.log(template);
const request = (
await rRuntimeServices.consumption.incomingRequests.received({
receivedRequest: (template.content as RelationshipTemplateContentJSON).onNewRelationship,
requestSourceId: template.id
})
).value;
// console.log(request);
// console.log(DateTime.utc());
const req = await rRuntimeServices.consumption.incomingRequests.checkPrerequisites({
await rRuntimeServices.consumption.incomingRequests.checkPrerequisites({
requestId: request.id
});
// console.log(DateTime.utc());
return {
request: (
await rRuntimeServices.consumption.incomingRequests.requireManualDecision({
Expand Down

0 comments on commit 77d6e07

Please sign in to comment.