Skip to content

Commit

Permalink
Merge pull request #186 from quadratichq/development-tests-for-sheetC…
Browse files Browse the repository at this point in the history
…ontroller

Development tests for sheet controller
  • Loading branch information
davidkircos authored Jan 20, 2023
2 parents e63b79a + b0fe49a commit 4e9c6fd
Show file tree
Hide file tree
Showing 20 changed files with 965 additions and 745 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install chromium
- name: Run Playwright tests
run: npm run test-e2e -- --project=chromium
run: npm run test:e2e -- --project=chromium
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
cache: 'pip'
- run: pip install -r requirements.txt
- run: npm install
- run: npm run test-python
- run: npm run test:python
6 changes: 3 additions & 3 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ on: push

jobs:
build_test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-4-cores

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '17'
node-version: '18'
cache: 'npm'
- run: npm install
- run: npm run test-unit
- run: npm run test:unit:ci
7 changes: 7 additions & 0 deletions jest-transformer-py.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This is a transformer for Jest to transform python files to strings for import
// only used in jest tests.
module.exports = {
process: (content) => {
return { code: 'module.exports = ' + JSON.stringify(content) };
},
};
10 changes: 8 additions & 2 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"bail": 1,
"verbose": true,
"preset": "ts-jest"
}
"preset": "ts-jest",
"testPathIgnorePatterns": ["<rootDir>/tests-e2e/*"],
"transform": {
"^.+\\.(ts|tsx|js|jsx)?$": "ts-jest",
"\\.py$": "<rootDir>/jest-transformer-py"
},
"testTimeout": 15000
}
Loading

0 comments on commit 4e9c6fd

Please sign in to comment.