Skip to content

Commit

Permalink
ABF-8556 chore(deps): update equisoft-actions/yarn-jest action (#486)
Browse files Browse the repository at this point in the history
* chore(deps): update equisoft-actions/yarn-jest action

* Use @equisoft/jest-utils

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Toby Daigle <[email protected]>
  • Loading branch information
renovate[bot] and toby-daigle authored Sep 17, 2024
1 parent 526deb0 commit 6c84c8b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
uses: equisoft-actions/yarn-install@v1

- name: Run Jest
uses: equisoft-actions/yarn-jest@v1
uses: equisoft-actions/yarn-jest@v2


build:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@babel/preset-typescript": "7.24.7",
"@equisoft/eslint-config": "3.0.7",
"@equisoft/eslint-config-typescript": "3.0.7",
"@equisoft/jest-utils": "1.6.0",
"@equisoft/typescript-config": "2.0.0",
"@microsoft/eslint-formatter-sarif": "3.1.0",
"@types/babel__core": "^7",
Expand Down
74 changes: 25 additions & 49 deletions tests/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,30 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
/* eslint-disable @typescript-eslint/no-var-requires */
const { createJestConfig } = require('@equisoft/jest-utils');

module.exports = {
preset: 'ts-jest',
const config = {
moduleNameMapper: {},

rootDir: './../',
roots: [
'<rootDir>/src',
],

collectCoverageFrom: ['<rootDir>/src/**/*.{js,ts}'],

testEnvironment: 'node',

restoreMocks: true,

transformIgnorePatterns: ['/node_modules/'],
transform: {
'^.+\\.ts?$': [
'ts-jest',
{
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
},
'^.+\\.ts?$': ['ts-jest', {
tsconfig: './tsconfig.json',
},
],
'^.+\\.(js|jsx)$': 'babel-jest',
'^.+\\.(js)$': 'babel-jest',
},
clearMocks: true,
errorOnDeprecated: true,
moduleDirectories: [
'src',
'node_modules',
],
moduleNameMapper: {},
reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'build/jest/',
outputName: 'junit.xml',
suiteNameTemplate: '{filepath}',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
],
resetMocks: true,
rootDir: '../',
testMatch: [
'**/*.spec.ts',
],
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}'],
coverageDirectory: 'build/jest/coverage',
coveragePathIgnorePatterns: [
'/index\\.[jt]sx?$',
'.+\\.d\\.ts$',
],
coverageProvider: 'v8',
coverageReporters: [
// Supported reporters: https://istanbul.js.org/docs/advanced/alternative-reporters/
'text',
'html',
'clover', // ADR-05
],

};

module.exports = createJestConfig(config);
/* eslint-enable @typescript-eslint/no-var-requires */
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,18 @@ __metadata:
languageName: node
linkType: hard

"@equisoft/jest-utils@npm:1.6.0":
version: 1.6.0
resolution: "@equisoft/jest-utils@npm:1.6.0"
dependencies:
pretty-format: "npm:29.7.0"
peerDependencies:
jest-junit: "*"
ts-jest: "*"
checksum: 10c0/b3742025e440d0d3f9c5d740afaa253ef77f55193f3222a1fcda69153d2aae02b6c4b2c03be46c2f71f2aaaafccde4bebe02040da0524f30ef916b5af0268dcd
languageName: node
linkType: hard

"@equisoft/tax-ca@workspace:.":
version: 0.0.0-use.local
resolution: "@equisoft/tax-ca@workspace:."
Expand All @@ -1436,6 +1448,7 @@ __metadata:
"@babel/preset-typescript": "npm:7.24.7"
"@equisoft/eslint-config": "npm:3.0.7"
"@equisoft/eslint-config-typescript": "npm:3.0.7"
"@equisoft/jest-utils": "npm:1.6.0"
"@equisoft/typescript-config": "npm:2.0.0"
"@microsoft/eslint-formatter-sarif": "npm:3.1.0"
"@types/babel__core": "npm:^7"
Expand Down Expand Up @@ -5602,7 +5615,7 @@ __metadata:
languageName: node
linkType: hard

"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0":
"pretty-format@npm:29.7.0, pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0":
version: 29.7.0
resolution: "pretty-format@npm:29.7.0"
dependencies:
Expand Down

0 comments on commit 6c84c8b

Please sign in to comment.