Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoApp committed Jan 15, 2024
1 parent a90e524 commit 534e043
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/anytinkClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AnythinkClient {
constructor() {
this.client = axios.create({
baseURL: "http://localhost:3000",
timeout: 2000,
timeout: 10000,
});
}

Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/concurrent/items.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ describe("Items Route", () => {
})
).toBe(true);

const retreivedItem = await anythinkClient.getItem(item.slug);
expect(matchObjects(retreivedItem, updatedItemResult)).toBe(true);
const retrievedItem = await anythinkClient.getItem(item.slug);
expect(matchObjects(retrievedItem, updatedItemResult)).toBe(true);
};
});

Expand Down Expand Up @@ -265,17 +265,17 @@ describe("Items Route", () => {
).rejects.toThrow();
});

test("Comments are retreived in reversed order", async () => {
test("Comments are retrieved in reversed order", async () => {
const item = await anythinkClient.createItem(randomItemInfo(), user);
const commnets = await addComments(item, [
const comments = await addComments(item, [
commentingUserA,
commentingUserB,
]);

const itemsComments = await anythinkClient.getComments(item.slug);

expect(itemsComments[0]).toMatchObject(commnets[1]);
expect(itemsComments[1]).toMatchObject(commnets[0]);
expect(itemsComments[0]).toMatchObject(comments[1]);
expect(itemsComments[1]).toMatchObject(comments[0]);
});

test("Users can delete their own comments", async () => {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/jest.concurrent.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ module.exports = {
testPathIgnorePatterns: ["/node_modules/", "/sequential/"],
globalSetup: "<rootDir>/setup.js",
globalTeardown: "<rootDir>/teardown.js",
testTimeout: 30000,
};

0 comments on commit 534e043

Please sign in to comment.