Skip to content
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

feat(build): uplift Jest to v29 #29118

Merged
merged 29 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a37a323
chore: remove ipython from development dependencies (#28703)
mistercrunch May 25, 2024
09eafe0
Merge branch 'master' into uplift-jest-to-v29
hainenber Jun 7, 2024
5785f33
feat(*): uplift Jest to v29 + related packages
hainenber Jun 8, 2024
46f7bb2
feat(frontend): modify config for upgraded Jest
hainenber Jun 8, 2024
cee8fc7
chore(git): ignore Jest test artifacts
hainenber Jun 8, 2024
697c4e9
feat(*): refactor codebase after upgrading Jest to v29
hainenber Jun 8, 2024
d841530
fix(controls/metric_control): null check before calling `resize`
hainenber Jun 8, 2024
4d1920d
fix(ci): add missing license for newly split test file
hainenber Jun 8, 2024
62cf465
chore: re-add missing change after updating branch with latest `maste…
hainenber Jun 8, 2024
1527386
chore: fix eslint error
hainenber Jun 8, 2024
c72e73c
feat(ci): separate worker count selection when running Jest in differ…
hainenber Jun 9, 2024
1ae15c7
Update superset-frontend/src/explore/components/controls/MetricContro…
hainenber Jun 13, 2024
3cc1280
chore: remove obsolete comment
hainenber Jun 13, 2024
61a9156
chore: migrate away from deprecated Jest function `toBeCalled`
hainenber Jun 13, 2024
30b86a9
chore: migrate away from `enzyme` + restore unintended change
hainenber Jun 13, 2024
6a664b3
Merge branch 'master' into uplift-jest-to-v29
hainenber Jun 13, 2024
72fd192
fix(src/comp/editor_auto_sync): fix failed tests after Jest upgrade
hainenber Jun 13, 2024
751e17e
Merge branch 'master' into uplift-jest-to-v29
hainenber Jun 15, 2024
bf9049f
chore(frontend): update lockfile with `npm i`
hainenber Jun 15, 2024
18a9df1
feat(frontend): refactor latest changes from `master` to be compatibl…
hainenber Jun 15, 2024
cb7a3b9
chore: add newline at end of file
hainenber Jun 15, 2024
66308ad
Merge branch 'master' into uplift-jest-to-v29
hainenber Jun 25, 2024
a325d58
chore(dashboard/components): remove skipped, Enzyme-based Jest test
hainenber Jun 25, 2024
a68255f
Update superset-frontend/src/pages/SavedQueryList/SavedQueryList.test…
hainenber Jun 25, 2024
f9c9b19
chore: run `npm run lint-fix`
hainenber Jun 25, 2024
1eb4507
Revert "chore(dashboard/components): remove skipped, Enzyme-based Jes…
hainenber Jun 25, 2024
63dd96a
chore: rename skipped test to have `.testSkipped` domain
hainenber Jun 25, 2024
40fcd8d
fix(ci): revert rename skipped test to have `.testSkipped` domain
hainenber Jun 25, 2024
f8839a7
fix(ci): limit max Jest workers even for CI to prevent constrainted r…
hainenber Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/superset-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
if: steps.check.outputs.frontend
working-directory: ./superset-frontend
run: |
npm run test -- --coverage --silent
npm run test:ci -- --coverage --silent
# todo: remove this step when fix generator as a project in root jest.config.js
- name: generator-superset unit tests
if: steps.check.outputs.frontend
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,8 @@ docker/requirements-local.txt

cache/
docker/*local*

.temp_cache

# Jest test report
test-report.html
5,905 changes: 2,714 additions & 3,191 deletions superset-embedded-sdk/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions superset-embedded-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"@babel/core": "^7.16.12",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@types/jest": "^27.4.1",
"@types/jest": "^29.5.12",
"axios": "^1.6.0",
"babel-loader": "^8.2.3",
"jest": "^27.5.1",
"jest": "^29.7.0",
"typescript": "^4.5.5",
"webpack": "^5.67.0",
"webpack-cli": "^4.9.2"
Expand Down
2 changes: 1 addition & 1 deletion superset-embedded-sdk/src/guestTokenRefresh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {

describe("guest token refresh", () => {
beforeAll(() => {
jest.useFakeTimers("modern"); // "modern" allows us to fake the system time
jest.useFakeTimers();
jest.setSystemTime(new Date("2022-03-03 01:00"));
jest.spyOn(global, "setTimeout");
});
Expand Down
13 changes: 12 additions & 1 deletion superset-frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ module.exports = {
testEnvironment: 'jsdom',
modulePathIgnorePatterns: ['<rootDir>/packages/generator-superset'],
setupFilesAfterEnv: ['<rootDir>/spec/helpers/setup.ts'],
testURL: 'http://localhost',
testEnvironmentOptions: {
url: 'http://localhost',
},
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'{packages,plugins}/**/src/**/*.{js,jsx,ts,tsx}',
Expand All @@ -60,4 +62,13 @@ module.exports = {
__DEV__: true,
caches: true,
},
reporters: [
'default',
[
'./node_modules/jest-html-reporter',
{
pageTitle: 'Test Report',
},
],
],
};
Loading
Loading