Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoApp committed Jan 16, 2024
1 parent 993251f commit 589c6ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
WILCO_ID="`cat .wilco`"
ENGINE_EVENT_ENDPOINT="${ENGINE_BASE_URL}/users/${WILCO_ID}/event"
CODESPACE_BACKEND_HOST="${CODESPACE_NAME}-3000.preview.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
CODESPACE_BACKEND_HOST=$(curl -s "${ENGINE_BASE_URL}/api/v1/codespace/backendHost?codespaceName=${CODESPACE_NAME}&portForwarding=${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" | jq -r '.codespaceBackendHost')
CODESPACE_BACKEND_URL="https://${CODESPACE_BACKEND_HOST}"

# Update engine that codespace started for user
Expand All @@ -22,4 +22,4 @@ echo "printf \"\n=============================================\n\"" >> ~/.bashrc
echo "gh codespace ports -c $CODESPACE_NAME" >> ~/.bashrc
echo "printf \"=============================================\n\"" >> ~/.bashrc
echo "printf \"(Once docker-compose is up and running, you can access the frontend and backend using the above urls)\n\"" >> ~/.bashrc
echo "printf \"\n\x1b[31m \x1b[1m👉 Type: \\\`docker-compose up\\\` to run the project. 👈\n\n\"" >> ~/.bashrc
echo "printf \"\n\x1b[31m \x1b[1m👉 Type: \\\`docker compose up\\\` to run the project. 👈\n\n\"" >> ~/.bashrc
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 589c6ed

Please sign in to comment.