fix: fixed some problems with tests
This commit is contained in:
committed by
Adolfo R. Brandes
parent
ef6c498bb7
commit
b106d0694f
1
package-lock.json
generated
1
package-lock.json
generated
@@ -42,6 +42,7 @@
|
||||
"devDependencies": {
|
||||
"@edx/browserslist-config": "^1.2.0",
|
||||
"@edx/reactifex": "^2.1.1",
|
||||
"@edx/typescript-config": "^1.1.0",
|
||||
"@openedx/frontend-build": "^14.6.2",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"scripts": {
|
||||
"build": "fedx-scripts webpack",
|
||||
"i18n_extract": "fedx-scripts formatjs extract",
|
||||
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
|
||||
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx .",
|
||||
"lint": "fedx-scripts eslint --ext .js --ext .jsx src/",
|
||||
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx src/",
|
||||
"snapshot": "fedx-scripts jest --updateSnapshot",
|
||||
"start": "fedx-scripts webpack-dev-server --progress",
|
||||
"dev": "PUBLIC_PATH=/communications/ MFE_CONFIG_API_URL='http://localhost:8000/api/mfe_config/v1' fedx-scripts webpack-dev-server --progress --host apps.local.openedx.io",
|
||||
@@ -62,6 +62,7 @@
|
||||
"devDependencies": {
|
||||
"@edx/browserslist-config": "^1.2.0",
|
||||
"@edx/reactifex": "^2.1.1",
|
||||
"@edx/typescript-config": "^1.1.0",
|
||||
"@openedx/frontend-build": "^14.6.2",
|
||||
"@testing-library/jest-dom": "^6.6.3",
|
||||
"@testing-library/react": "^16.2.0",
|
||||
|
||||
@@ -23,10 +23,6 @@ jest.mock('react-router-dom', () => ({
|
||||
courseId: 'test-course-id',
|
||||
})),
|
||||
}));
|
||||
jest.mock('@edx/frontend-component-header', () => ({
|
||||
__esModule: true,
|
||||
default: () => null,
|
||||
}));
|
||||
|
||||
describe('BulkEmailTool', () => {
|
||||
beforeEach(() => jest.resetModules());
|
||||
|
||||
@@ -23,10 +23,6 @@ jest.mock('react-router-dom', () => ({
|
||||
courseId: 'test-course-id',
|
||||
})),
|
||||
}));
|
||||
jest.mock('@edx/frontend-component-header', () => ({
|
||||
__esModule: true,
|
||||
default: () => null,
|
||||
}));
|
||||
|
||||
describe('PageContainer', () => {
|
||||
beforeEach(() => jest.resetModules());
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
} from '@edx/frontend-platform';
|
||||
|
||||
// Jest needs this for module resolution
|
||||
import * as app from '.'; // eslint-disable-line no-unused-vars
|
||||
import * as app from '.'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
|
||||
// These need to be var not let so they get hoisted
|
||||
// and can be used by jest.mock (which is also hoisted)
|
||||
|
||||
13
tsconfig.json
Normal file
13
tsconfig.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "@edx/typescript-config",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./src",
|
||||
"paths": {
|
||||
"*": ["*"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["*.js", ".eslintrc.js", "src/**/*", "plugins/**/*", "jest.config.ts"],
|
||||
"exclude": ["*.js", ".eslintrc.js", "dist", "node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user