@openedx/frontend-base 2.0.0-alpha.5 → 2.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/runtime/jest.config.js +2 -2
- package/dist/runtime/jest.config.js.map +1 -1
- package/dist/shell/jest.config.js +2 -2
- package/dist/shell/jest.config.js.map +1 -1
- package/dist/tools/eslint/base.eslint.config.js +1 -0
- package/dist/tools/jest/jest.config.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,8 @@ Once the change matures, we recommend moving over to the pre-configured [npm wor
|
|
|
28
28
|
|
|
29
29
|
To do so, check this repository out into the site's `packages/` directory. Then, run `npm run dev:packages` from the site's root directory: this will watch-build any workspace check-outs and start the dev server, picking up changes automatically. If any apps (such as `frontend-app-instructor-dashboard`) require corresponding changes, you can check them out into the `packages/` directory as siblings to `frontend-base`. See [Local development with workspaces](https://github.com/openedx/frontend-template-site#local-development-with-workspaces) for full setup details.
|
|
30
30
|
|
|
31
|
+
Checkouts in `packages/` are excluded from an app's Jest crawl, so running the app's test suite there behaves the same as it does against a published `frontend-base`.
|
|
32
|
+
|
|
31
33
|
### Continuous integration
|
|
32
34
|
|
|
33
35
|
In addition to running lint and the test suite, Github CI builds the included `test-site` against a packed tarball of `frontend-base`. This verifies that the library still works end-to-end as a real dependency of a consuming site.
|
|
@@ -4,8 +4,8 @@ module.exports = {
|
|
|
4
4
|
'<rootDir>/setupTest.js',
|
|
5
5
|
],
|
|
6
6
|
moduleNameMapper: {
|
|
7
|
-
'\\.svg$': '<rootDir>/
|
|
8
|
-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir/
|
|
7
|
+
'\\.svg$': '<rootDir>/testMocks/svg.js',
|
|
8
|
+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/testMocks/file.js',
|
|
9
9
|
'\\.(css|scss)$': require.resolve('identity-obj-proxy'),
|
|
10
10
|
'site.config': '<rootDir>/site.config.test.tsx',
|
|
11
11
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../../runtime/jest.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,kBAAkB,EAAE;QAClB,wBAAwB;KACzB;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,4BAA4B;QACvC,iFAAiF,EAAE,
|
|
1
|
+
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../../runtime/jest.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,kBAAkB,EAAE;QAClB,wBAAwB;KACzB;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,4BAA4B;QACvC,iFAAiF,EAAE,6BAA6B;QAChH,gBAAgB,EAAE,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACvD,aAAa,EAAE,gCAAgC;KAChD;IACD,eAAe,EAAE,OAAO;IACxB,sBAAsB,EAAE;QACtB,GAAG,EAAE,mBAAmB;KACzB;IACD,mBAAmB,EAAE;QACnB,gCAAgC;KACjC;IACD,0BAA0B,EAAE;QAC1B,wBAAwB;KACzB;IACD,uBAAuB,EAAE;QACvB,4EAA4E;KAC7E;IACD,wBAAwB,EAAE;QACxB,QAAQ;KACT;IACD,sBAAsB,EAAE;QACtB,uBAAuB;QACvB,gBAAgB;QAChB,QAAQ;KACT;CACF,CAAC","sourcesContent":["module.exports = {\n setupFilesAfterEnv: [\n '<rootDir>/setupTest.js',\n ],\n moduleNameMapper: {\n '\\\\.svg$': '<rootDir>/testMocks/svg.js',\n '\\\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/testMocks/file.js',\n '\\\\.(css|scss)$': require.resolve('identity-obj-proxy'),\n 'site.config': '<rootDir>/site.config.test.tsx',\n },\n testEnvironment: 'jsdom',\n testEnvironmentOptions: {\n url: 'http://localhost/',\n },\n collectCoverageFrom: [\n '<rootDir>/**/*.{js,jsx,ts,tsx}',\n ],\n coveragePathIgnorePatterns: [\n '<rootDir>/setupTest.js',\n ],\n transformIgnorePatterns: [\n '/node_modules/(?!(@openedx|@edx|react-intl|@formatjs|intl-messageformat)/)',\n ],\n modulePathIgnorePatterns: [\n '/dist/',\n ],\n testPathIgnorePatterns: [\n '/site.config.test.tsx',\n '/node_modules/',\n '/dist/',\n ],\n};\n"]}
|
|
@@ -4,8 +4,8 @@ module.exports = {
|
|
|
4
4
|
'./setupTest.js',
|
|
5
5
|
],
|
|
6
6
|
moduleNameMapper: {
|
|
7
|
-
'\\.svg$': '<rootDir>/
|
|
8
|
-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/
|
|
7
|
+
'\\.svg$': '<rootDir>/testMocks/svg.js',
|
|
8
|
+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/testMocks/file.js',
|
|
9
9
|
'\\.(css|scss)$': require.resolve('identity-obj-proxy'),
|
|
10
10
|
'site.config': '<rootDir>/site.config.test.tsx',
|
|
11
11
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../../shell/jest.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,kBAAkB,EAAE;QAClB,gBAAgB;KACjB;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,4BAA4B;QACvC,iFAAiF,EAAE,6BAA6B;QAChH,gBAAgB,EAAE,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACvD,aAAa,EAAE,gCAAgC;KAChD;IACD,eAAe,EAAE,OAAO;IACxB,sBAAsB,EAAE;QACtB,GAAG,EAAE,mBAAmB;KACzB;IACD,mBAAmB,EAAE;QACnB,gCAAgC;KACjC;IACD,0BAA0B,EAAE;QAC1B,gBAAgB;QAChB,cAAc;KACf;IACD,uBAAuB,EAAE;QACvB,4EAA4E;KAC7E;IACD,sBAAsB,EAAE;QACtB,uBAAuB;QACvB,gBAAgB;QAChB,QAAQ;KACT;CACF,CAAC","sourcesContent":["module.exports = {\n setupFilesAfterEnv: [\n './setupTest.js',\n ],\n moduleNameMapper: {\n '\\\\.svg$': '<rootDir>/
|
|
1
|
+
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../../shell/jest.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,kBAAkB,EAAE;QAClB,gBAAgB;KACjB;IACD,gBAAgB,EAAE;QAChB,SAAS,EAAE,4BAA4B;QACvC,iFAAiF,EAAE,6BAA6B;QAChH,gBAAgB,EAAE,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACvD,aAAa,EAAE,gCAAgC;KAChD;IACD,eAAe,EAAE,OAAO;IACxB,sBAAsB,EAAE;QACtB,GAAG,EAAE,mBAAmB;KACzB;IACD,mBAAmB,EAAE;QACnB,gCAAgC;KACjC;IACD,0BAA0B,EAAE;QAC1B,gBAAgB;QAChB,cAAc;KACf;IACD,uBAAuB,EAAE;QACvB,4EAA4E;KAC7E;IACD,sBAAsB,EAAE;QACtB,uBAAuB;QACvB,gBAAgB;QAChB,QAAQ;KACT;CACF,CAAC","sourcesContent":["module.exports = {\n setupFilesAfterEnv: [\n './setupTest.js',\n ],\n moduleNameMapper: {\n '\\\\.svg$': '<rootDir>/testMocks/svg.js',\n '\\\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/testMocks/file.js',\n '\\\\.(css|scss)$': require.resolve('identity-obj-proxy'),\n 'site.config': '<rootDir>/site.config.test.tsx',\n },\n testEnvironment: 'jsdom',\n testEnvironmentOptions: {\n url: 'http://localhost/',\n },\n collectCoverageFrom: [\n '<rootDir>/**/*.{js,jsx,ts,tsx}',\n ],\n coveragePathIgnorePatterns: [\n '/node_modules/',\n 'setupTest.js',\n ],\n transformIgnorePatterns: [\n '/node_modules/(?!(@openedx|@edx|react-intl|@formatjs|intl-messageformat)/)',\n ],\n testPathIgnorePatterns: [\n '/site.config.test.tsx',\n '/node_modules/',\n '/dist/',\n ],\n};\n"]}
|
|
@@ -19,12 +19,20 @@ module.exports = {
|
|
|
19
19
|
transformIgnorePatterns: [
|
|
20
20
|
'/node_modules/(?!(@openedx|@edx|react-intl|@formatjs|intl-messageformat)/)',
|
|
21
21
|
],
|
|
22
|
+
/*
|
|
23
|
+
* 'packages/' holds gitignored, bind-mounted checkouts used for local
|
|
24
|
+
* development. Excluding it here keeps jest-haste-map from crawling those
|
|
25
|
+
* checkouts, which would otherwise register their manual mocks and collect
|
|
26
|
+
* their test suites as if they belonged to this app.
|
|
27
|
+
*/
|
|
22
28
|
modulePathIgnorePatterns: [
|
|
23
29
|
'/dist/',
|
|
30
|
+
'<rootDir>/packages/',
|
|
24
31
|
],
|
|
25
32
|
testPathIgnorePatterns: [
|
|
26
33
|
'/site.config.test.tsx',
|
|
27
34
|
'/node_modules/',
|
|
28
35
|
'/dist/',
|
|
36
|
+
'<rootDir>/packages/',
|
|
29
37
|
],
|
|
30
38
|
};
|