Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
37 changes: 7 additions & 30 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
{
"plugins": [
"transform-object-assign",
"transform-object-rest-spread"
],
"presets": [
[
"env",
{
"targets": {
"browsers": [
"last 2 versions",
"IE >= 11"
]
},
"modules": false
}
"plugins": [
"@babel/transform-object-assign",
"@babel/plugin-proposal-object-rest-spread",
],
"babel-preset-react"
],
"env": {
"test": {
"presets": [
[
"env",
{
"modules": "commonjs",
}
]
]
}
},
"presets": [
"@babel/react",
"@babel/preset-env"
]
}
5 changes: 4 additions & 1 deletion .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 12 ]
node-version: [ 12, 14, 16 ]
python-version: [ 3.8 ]

steps:
Expand All @@ -28,6 +28,9 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Setup npm
run: npm i -g npm@8.5.x

- name: Install Firefox 61.0
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
node-version: [ 12 ]

node-version: [ 12, 14, 16 ]
steps:

- uses: actions/checkout@v2
Expand All @@ -39,6 +39,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Setup npm
run: npm i -g npm@8.5.x

- name: Get pip cache dir
id: pip-cache-dir
run: |
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ RUN pip install -r requirements/edx/base-minus-local.txt
# via pip.
# The node environment is already 'activated' because its .../bin was put on $PATH.
RUN nodeenv /edx/app/edxapp/nodeenv --node=12.11.1 --prebuilt
RUN npm install -g npm@8.5.x
COPY package.json package.json
COPY package-lock.json package-lock.json
RUN npm set progress=false && npm install
Expand Down
31 changes: 16 additions & 15 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
module.exports = {
"globals": {
"gettext": (t) => { return t; },
},
"modulePaths": [
"common/static/common/js/components",
],
"setupTestFrameworkScriptFile": "<rootDir>/setupTests.js",
"testMatch": [
"/**/*.test.jsx",
"common/static/common/js/components/**/?(*.)+(spec|test).js?(x)",
],
"transform": {
"^.+\\.jsx$": "babel-jest",
"^.+\\.js$": "babel-jest",
},
"globals": {
"gettext": (t) => { return t; },
},
"modulePaths": [
"common/static/common/js/components",
],
"setupFilesAfterEnv": ["<rootDir>/setupTests.js"],
"testMatch": [
"/**/*.test.jsx",
"common/static/common/js/components/**/?(*.)+(spec|test).js?(x)",
],
"testEnvironment": "jsdom",
"transform": {
"^.+\\.jsx$": "babel-jest",
"^.+\\.js$": "babel-jest",
},
};
Loading