Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vpiyachinda committed Feb 9, 2024
1 parent f089e62 commit 2f5ebb4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,8 @@ if the version is not updated, delete node_modules folder and reinstall

The idea is you can publish the new version using `release` job on CI.

# for playwright
## for playwright
please read doc/PLAYWRIGHT.md

## for vitest
please read doc/VITEST.md
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@playwright/test": "^1.30.1",
"@types/jest": "^29.5.1",
"@types/luxon": "^3.3.0",
"@types/node": "^20.3.3",
"@types/node": "^20.11.16",
"@types/uuid": "^9.0.2",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
Expand Down
6 changes: 1 addition & 5 deletions src/vitest/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ export const getCommonMetadata = (
};
};

const ENDPOINT_FROM_TYPE = {
vitest: process.env.VITEST_TESTDATA_API_URL ?? UNKNOWN_VALUE, // your api endpoint eg. http://your_domain/vitest
};

const LOG_FILE = 'devfeedback.log';

const sendData = async (endpoint: string, data: CommonMetadata): Promise<boolean> => {
Expand All @@ -71,7 +67,7 @@ const sendData = async (endpoint: string, data: CommonMetadata): Promise<boolean
};

export const sendTestData = async (testData: VitestTestData) => {
const endpoint = ENDPOINT_FROM_TYPE[testData.type];
const endpoint = process.env.VITEST_TESTDATA_API_URL ?? UNKNOWN_VALUE; // your api endpoint eg. http://your_domain/vitest

console.log(`Your test time was ${testData.timeTaken.toFixed(2)}ms.`);

Expand Down

0 comments on commit 2f5ebb4

Please sign in to comment.