Skip to content

Commit

Permalink
feat: refactor tests to jest and testing library
Browse files Browse the repository at this point in the history
  • Loading branch information
mszekiel committed Sep 5, 2024
1 parent 5e2bbc4 commit 08bba22
Show file tree
Hide file tree
Showing 15 changed files with 1,423 additions and 217 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: "Main - Lint/Build/Tests"

on:
push:
branches:
- main
branches: [main, master]
pull_request:
# TODO: Remove jonas-jonas/elementsv1 when we merge the branch
branches: [main, master, jonas-jonas/elementsv1]

jobs:
deploy:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -18,7 +20,3 @@ jobs:
- run: npm ci
- run: npx playwright install --with-deps
- run: npx nx run-many --target=build --all
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
194 changes: 0 additions & 194 deletions jest.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
import { getJestProjects } from "@nx/jest"

export default {
projects: [...getJestProjects(), "<rootDir>/jest.config.ts"],
projects: getJestProjects(),
}
5 changes: 5 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const nxPreset = require("@nx/jest/preset").default

module.exports = {
...nxPreset,
}
6 changes: 6 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
"options": {
"targetName": "eslint:lint"
}
},
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
}
}
]
}
Loading

0 comments on commit 08bba22

Please sign in to comment.