Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Jest Tests

on:
pull_request:
branches:
- master

jobs:
jest:
name: Run Jest tests
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: yarn install --immutable

- name: Run Jest tests
run: yarn test --testPathPattern="rpcParsing" --testTimeout=30000
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
}
8 changes: 8 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const nodeFetch = require('node-fetch')
const globalObject = typeof globalThis !== 'undefined' ? globalThis : global
if (!globalObject.fetch) {
globalObject.fetch = nodeFetch.default || nodeFetch
globalObject.Request = nodeFetch.Request
globalObject.Response = nodeFetch.Response
globalObject.Headers = nodeFetch.Headers
}
Loading
Loading