Skip to content

Commit

Permalink
attempt again
Browse files Browse the repository at this point in the history
  • Loading branch information
ssh51117 committed May 16, 2024
1 parent b2dfb4f commit 57d0afd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ it("test successful create trainspace call", async () => {
httpStatusCode: 200,
}
})
//@ts-expect-error
//@ts-expect-error 1
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -50,7 +50,7 @@ it("test internal service error", async () => {
httpStatusCode: 456,
}
})
// @ts-expect-error
// @ts-expect-error 2
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -75,7 +75,7 @@ it("test undefined event", async () => {
httpStatusCode: 400,
}
})
// @ts-expect-error : we are trying to cause an error
// @ts-expect-error 3
const result = await handler(undefined);
expect(result.statusCode).toEqual(404);
});
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ it("test successful delete all trainspace call", async () => {
}
})

// @ts-expect-error
//@ts-expect-error 1
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -55,7 +55,7 @@ it("test no batch delete response call", async () => {
}
})

//@ts-expect-error
//@ts-expect-error 2
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -80,7 +80,7 @@ it("test incorrect batch delete response failed call", async () => {
}
})

// @ts-expect-error
//@ts-expect-error 3
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -103,7 +103,7 @@ it("test delete all on no existing trainspaces call", async () => {
}
})

//@ts-expect-error
//@ts-expect-error 4
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -116,7 +116,7 @@ it("test delete all on no existing trainspaces call", async () => {

it("test malformed call", async () => {

// @ts-expect-error : we are trying to cause an error
// @ts-expect-error 5
const result = await handler(undefined);
expect(result.statusCode).toEqual(400);
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ it("test successful delete trainspace call", async () => {
httpStatusCode: 200,
}
})
// @ts-expect-error
//@ts-expect-error 1
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -50,7 +50,7 @@ it("test no response failed operation call", async () => {
}
})

//@ts-expect-error
//@ts-expect-error 2
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -76,7 +76,7 @@ it("test different status code failed operation call", async () => {
httpStatusCode: 267,
}
})
// @ts-expect-error
//@ts-expect-error 3
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -102,7 +102,7 @@ it("test no trainspace id given", async () => {
}
})

//@ts-expect-error
//@ts-expect-error 4
const event: APIGatewayProxyEventV2 = {
pathParameters: {
}
Expand All @@ -114,7 +114,7 @@ it("test no trainspace id given", async () => {


it("test malformed call", async () => {
// @ts-expect-error : we are trying to cause an error
// @ts-expect-error 5
const result = await handler(undefined);
expect(result.statusCode).toEqual(400);
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ it("test successful get all trainspace call", async () => {
}],
"Count": 4
});
// @ts-expect-error
// @ts-expect-error 1
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -42,7 +42,7 @@ it("test no existing trainspaces for user id", async () => {
Items: undefined
})

//@ts-expect-error
//@ts-expect-error 2
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -54,7 +54,7 @@ it("test no existing trainspaces for user id", async () => {
});

it("test malformed request", async () => {
// @ts-expect-error : we are trying to cause an error
// @ts-expect-error 3
const result = await handler(undefined);
expect(result.statusCode).toEqual(400);
});
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ it("test successful create user call", async () => {
httpStatusCode: 200,
}
})
//@ts-expect-error
//@ts-expect-error 1
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -46,7 +46,7 @@ it("test internal service error", async () => {
httpStatusCode: 456,
}
})
// @ts-expect-error
// @ts-expect-error 2
const event: APIGatewayProxyEventV2 = {
headers: {
authorization: 'abcd',
Expand All @@ -68,7 +68,7 @@ it("test undefined event", async () => {
httpStatusCode: 400,
}
})
// @ts-expect-error : we are trying to cause an error
// @ts-expect-error 3
const result = await handler(undefined);
expect(result.statusCode).toEqual(404);
});

0 comments on commit 57d0afd

Please sign in to comment.