-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SBERDOMA-872 update and configure jest #369
SBERDOMA-872 update and configure jest #369
Conversation
191104e
to
e9ccffa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the task it states to unclutter console logging.
I don't see, what was changed, — the same ~1500 lines of test logs in this and other pull-requests.
Please, show the differences, how. this extra plugins affected test logs.
cec1427
to
6f9f408
Compare
We need to check:
|
@@ -8,7 +8,8 @@ const { MESSAGE_SENDING_STATUS, MESSAGE_RESENDING_STATUS, MESSAGE_DELIVERED_STAT | |||
const sleep = async (time) => (new Promise((resolve => { | |||
setTimeout(resolve, time) | |||
}))) | |||
|
|||
// https://github.com/facebook/jest/issues/11500 | |||
jest.setTimeout(30000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to move it inside https://github.com/open-condo-software/condo/blob/master/apps/condo/jest.setup.js
@@ -84,3 +84,4 @@ jobs: | |||
DATABASE_URL: ${{ matrix.database }} | |||
NODE_ENV: development | |||
DISABLE_LOGGING: true | |||
IN_CI: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks useless.
silent: true, | ||
verbose: false, | ||
// https://stackoverflow.com/questions/43864793/why-does-jest-runinband-speed-up-tests | ||
maxWorkers: conf.IN_CI ? 1 : 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to fix the tests to support parallel mode
@@ -97,7 +97,9 @@ | |||
"@types/react": "^17.0.1", | |||
"babel-jest": "^26.6.3", | |||
"identity-obj-proxy": "^3.0.0", | |||
"jest": "^26.6.3", | |||
"jest": "27.0.6", | |||
"jest-clean-reporter": "https://github.com/MrFoxPro/jest-clean-reporter", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks super starnge
@@ -14,5 +16,13 @@ beforeAll(async () => { | |||
}) | |||
|
|||
afterAll(async () => { | |||
if (redisGuard.db) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't work =/
verbose: false, | ||
// https://stackoverflow.com/questions/43864793/why-does-jest-runinband-speed-up-tests | ||
maxWorkers: conf.IN_CI ? 1 : 4, | ||
noStackTrace: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it ok to disable stack trace for all developers?
return adapter | ||
} else { | ||
throw new Error(`getAdapter() call with unknown schema: ${databaseUrl}`) | ||
} | ||
} | ||
|
||
let redisClientHandler = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like hack!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is
Why you don't use |
No description provided.