Skip to content

Commit

Permalink
update jest condig
Browse files Browse the repository at this point in the history
  • Loading branch information
fveracoechea committed Aug 9, 2024
1 parent 19326b2 commit 57d865a
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/docs/api/functions/fetchtastic.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
function fetchtastic(baseUrl?, controller?): Fetchtastic
```

Creates a new instance of Fetchtastic, that represents an HTTP request configuration.
Creates a new instance of Fetchtastic which represents an HTTP request configuration.

## Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@

| Function | Description |
| ------ | ------ |
| [fetchtastic](functions/fetchtastic.md) | Creates a new instance of Fetchtastic, that represents an HTTP request configuration. |
| [fetchtastic](functions/fetchtastic.md) | Creates a new instance of Fetchtastic which represents an HTTP request configuration. |
| [isHttpMethod](functions/isHttpMethod.md) | Type guard function, returns `true` if the given value is a valid `HttpMethod` |
| [isStatusCode](functions/isStatusCode.md) | Type guard function to check if the input is a valid HTTP status code. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 16 additions & 16 deletions lib/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import type { Config } from 'jest';

const config: Config = {
testEnvironment: 'node',
preset: 'ts-jest/presets/default-esm', // or other ESM presets
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
// '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
tsconfig: './tsconfig.spec.json',
},
],
},
// testEnvironment: 'node',
preset: 'ts-jest', // or other ESM presets
// moduleNameMapper: {
// '^(\\.{1,2}/.*)\\.js$': '$1',
// },
// transform: {
// // '^.+\\.[tj]sx?$' to process ts,js,tsx,jsx with `ts-jest`
// // '^.+\\.m?[tj]sx?$' to process ts,js,tsx,jsx,mts,mjs,mtsx,mjsx with `ts-jest`
// '^.+\\.tsx?$': [
// 'ts-jest',
// {
// useESM: true,
// tsconfig: './tsconfig.spec.json',
// },
// ],
// },
// automock: false,
// setupFiles: ['./jest.setup.ts'],
};
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "fetchtastic-monorepo",
"private": true,
"repository": {
"type": "git",
"url": "[email protected]:fveracoechea/fetchtastic.git"
},
"size-limit": [
{
"name": "CommonJS",
Expand All @@ -18,6 +22,7 @@
"test": "turbo run test",
"type-check": "turbo run type-check",
"dev": "turbo run dev",
"deploy:docs": "GIT_USER=fveracoechea SSH=true pnpm run --filter docs deploy",
"lint": "turbo run lint",
"size": "size-limit --json",
"prettier-check": "prettier '**/*.{js,ts,jsx,tsx,json,md,mdx}' --check",
Expand Down

0 comments on commit 57d865a

Please sign in to comment.