Skip to content

Commit

Permalink
Merge pull request #4 from etroynov/3-upgrade-to-jest-v29
Browse files Browse the repository at this point in the history
EJ-3. upgrade jest from 26 to 29
  • Loading branch information
etroynov committed Mar 1, 2024
2 parents 4203495 + baff372 commit ace16bd
Show file tree
Hide file tree
Showing 16 changed files with 4,072 additions and 3,049 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: esbuild-jest
name: CI

on: [push]

Expand All @@ -8,16 +8,16 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 15.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn build
- run: yarn test
- run: npm ci
- run: npm run build
- run: npm test
env:
CI: true
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"singleQuote": true
}
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# esbuild-jest

### A Jest transformer using esbuild
## A Jest transformer using esbuild
With this transformer you can use and transform (ts, js, tsx and jsx) files

[![npm](https://img.shields.io/npm/v/esbuild-jest.svg)](https://www.npmjs.com/package/esbuild-jest)
![build status](https://github.com/etroynov/esbuild-jest/actions/workflows/ci.yml/badge.svg)

## Install

```bash
Expand Down
24 changes: 0 additions & 24 deletions aria.config.ts

This file was deleted.

20 changes: 11 additions & 9 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
const hq = require('alias-hq')
const hq = require('alias-hq');

module.exports = {
transform: {
"\\.[jt]sx?$": [ 'esbuild-jest', {
'\\.[jt]sx?$': [
'./dist/index.js',
{
loaders: {
'.spec.js': 'jsx',
'.js': 'jsx'
}
}
]
'.js': 'jsx',
},
},
],
},
/// This will resolve any tsconfig.compilerOptions.paths
moduleNameMapper: hq.get('jest'),
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/types/' ],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
}
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/types/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};
Loading

0 comments on commit ace16bd

Please sign in to comment.