Skip to content

Commit

Permalink
feat(build): uplift Jest to v29 (apache#29118)
Browse files Browse the repository at this point in the history
Signed-off-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Maxime Beauchemin <maximebeauchemin@gmail.com>
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
  • Loading branch information
3 people authored Jun 25, 2024
1 parent f9f70e3 commit dffad48
Show file tree
Hide file tree
Showing 36 changed files with 23,209 additions and 23,035 deletions.
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

0 comments on commit dffad48

Please sign in to comment.