Skip to content

Commit

Permalink
Add jest testing setup to storefront
Browse files Browse the repository at this point in the history
  • Loading branch information
joerideg committed Nov 2, 2023
1 parent 3e21643 commit 906725d
Show file tree
Hide file tree
Showing 7 changed files with 9,668 additions and 5,761 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on: [push, pull_request]
jobs:
build:
name: Build
name: Build, lint & test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -20,6 +20,9 @@ jobs:
- name: 'Lint library'
working-directory: './brx-spartacus-library'
run: npm run lint
- name: 'Test library'
working-directory: './brx-spartacus-library'
run: npm run test
- name: 'Install dependencies for storefront'
working-directory: './brx-spartacus-storefront'
run: npm ci
Expand All @@ -29,3 +32,6 @@ jobs:
- name: 'Lint storefront'
working-directory: './brx-spartacus-storefront'
run: npm run lint
- name: 'Test storefront'
working-directory: './brx-spartacus-storefront'
run: npm run test
6 changes: 6 additions & 0 deletions brx-spartacus-storefront/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
}
}
},
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"tsConfig": "./tsconfig.spec.json"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
Expand Down
3 changes: 3 additions & 0 deletions brx-spartacus-storefront/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Put any jest config in here
module.exports = {
};
Loading

0 comments on commit 906725d

Please sign in to comment.