Jest
Last updated
Last updated
//jest.config.js
/** @type {import('jest').Config} */
const config = {
reporters: [
'default',
['jest-junit', {outputDirectory: 'reports', outputName: 'test-results.xml'}],
],
};
module.exports = config;$ npm install -g @testfiesta/tacotrucktacotruck testfiesta \
run:submit \
--token testfiesta_... \
--handle orgHandle \
--project projectKey \
--name runName \
--data results-path/*.xmlname: jest
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./demo-jest-tf
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: π¦ Install dependencies
run: npm install
- name: π§ͺ Test
run: npm run test
- name: Report Results
if: false
uses: testfiesta/tacotruck-action@v1
with:
provider: testfiesta
handle: handle
project: project
base-url: https://staging.api.testfiesta.com
credentials: ${{ secrets.TESTFIESTA_API_KEY }}
run-name: Jest CI run ${{ github.run_number }}
results-path: ./demo-jest-tf/reports/test-results.xml