Skip to content
Closed
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
68 changes: 57 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,78 @@
name: Test

on:
pull_request:
branches:
- main
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
test:
name: Test
timeout-minutes: 20
determine-packages:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.set-packages.outputs.packages }}
steps:
- uses: actions/checkout@v4
- name: Get package names
id: set-packages
run: |
SEARCH_DIRS="plugins utils validate convert enrich import export"

PACKAGES=$(
for dir in $SEARCH_DIRS; do
if [ -d "$dir" ]; then
find "$dir" -maxdepth 2 -name "package.json" -exec sh -c '
PACKAGE_NAME=$(jq -r .name {})
if [ "$PACKAGE_NAME" != "null" ]; then
echo "$PACKAGE_NAME"
fi
' \;
fi
done | jq -R -s -c 'split("\n")[:-1]'
)

echo "packages=$PACKAGES" >> $GITHUB_OUTPUT
echo "Found packages: $PACKAGES"

test-packages:
needs: determine-packages
name: ${{ matrix.package }}
runs-on: ubuntu-latest
if: ${{ github.head_ref != 'changeset-release/main' }}
strategy:
matrix:
package: ${{fromJson(needs.determine-packages.outputs.packages)}}
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build
run: npx turbo run build

- name: Test
run: npm run test
run: npx turbo run test --filter=${{ matrix.package }}

test:
needs: test-packages
name: Test
runs-on: ubuntu-latest
steps:
- name: Check test results
run: |
echo "All package tests completed successfully"
exit 0
16 changes: 16 additions & 0 deletions convert/what3words/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,
passWithNoTests: true,
}
4 changes: 2 additions & 2 deletions convert/what3words/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand All @@ -60,4 +60,4 @@
"devDependencies": {
"@flatfile/rollup-config": "0.1.1"
}
}
}
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
testEnvironment: 'node',
testRegex: '.*\\.(e2e-)?spec\\.ts$',
// testRegex: '(?<!\\.\\./)src/.*\\.(e2e-)?spec\\.ts$',
testMatch: ['<rootDir>/**/**/src/*.spec.ts'],

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
Expand All @@ -12,4 +14,5 @@ module.exports = {
testTimeout: 60_000,
globalSetup: '<rootDir>/test/setup-global.js',
forceExit: true,
passWithNoTests: true,
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
],
"scripts": {
"clean": "find ./ '(' -name 'node_modules' -o -name 'dist' -o -name '.turbo' -o -name '.parcel-cache' ')' -type d -exec rm -rf {} +",
"test": "turbo build && turbo test --concurrency=1",
"test": "jest --config=./jest.config.js --runInBand",
"build": "turbo build",
"turbo:test": "turbo test",
"build:prod": "turbo build:prod",
"build:clean": "npm run clean && npm i && turbo build",
"build:prod:clean": "npm run clean && npm i && turbo build:prod",
Expand Down
16 changes: 16 additions & 0 deletions plugins/autocast/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,
passWithNoTests: true,
Comment on lines +14 to +15

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Consider the implications of forceExit and passWithNoTests.

While these configurations can be useful, they come with potential drawbacks:

  1. forceExit: true forces Jest to exit after all tests complete. This might hide issues with asynchronous operations or memory leaks.
  2. passWithNoTests: true allows the test suite to pass when no tests are found. This can be useful during development but might hide issues in CI/CD pipelines.

Consider the following alternatives:

  1. Instead of forceExit, ensure all asynchronous operations are properly closed/resolved in your tests or afterAll blocks.
  2. For passWithNoTests, consider adding a check in your CI/CD pipeline to ensure that tests exist and are being run.

If you decide to keep these settings, please add comments explaining the rationale to prevent future confusion.

}
2 changes: 1 addition & 1 deletion plugins/autocast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand Down
16 changes: 16 additions & 0 deletions plugins/automap/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Issue Detected: dotenv-config.js File Not Found

The setupFiles configuration references '../../test/dotenv-config.js', but the file does not exist at this path. This may prevent environment variables from being properly loaded before tests run.

  • File Missing: ../../test/dotenv-config.js

Please ensure that the dotenv-config.js file exists at the specified location or update the path in jest.config.js accordingly.

🔗 Analysis chain

LGTM: Environment setup looks good.

The setupFiles configuration correctly includes the dotenv configuration file. This ensures that environment variables are properly loaded before tests run.

Please verify that the file path '../../test/dotenv-config.js' is correct and the file exists:


[/run_scripts]

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of the dotenv configuration file
if [ -f "test/dotenv-config.js" ]; then
    echo "dotenv-config.js file exists"
else
    echo "dotenv-config.js file not found"
fi

Length of output: 195


Script:

#!/bin/bash
# Verify the existence of the dotenv configuration file with the correct path
if [ -f "../../test/dotenv-config.js" ]; then
    echo "dotenv-config.js file exists"
else
    echo "dotenv-config.js file not found"
fi

Length of output: 113

setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 90_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,
passWithNoTests: true,
}
2 changes: 1 addition & 1 deletion plugins/automap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"build:watch": "parcel watch",
"build:prod": "NODE_ENV=production parcel build",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand Down
16 changes: 16 additions & 0 deletions plugins/constraints/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,
passWithNoTests: true,
}
2 changes: 1 addition & 1 deletion plugins/constraints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [],
"author": "David Boskovic",
Expand Down
1 change: 1 addition & 0 deletions plugins/constraints/src/external.constraint.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ describe('externalConstraint()', () => {
it('correctly assigns an error', async () => {
await createRecords(sheetId, defaultSimpleValueData)
await listener.waitFor('commit:created')

const records = await getRecords(sheetId)
expect(records[0].values['name'].messages[0]).toMatchObject({
type: 'error',
Expand Down
16 changes: 16 additions & 0 deletions plugins/dedupe/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,
passWithNoTests: true,
}
2 changes: 1 addition & 1 deletion plugins/dedupe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand Down
16 changes: 16 additions & 0 deletions plugins/delimiter-extractor/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider alternatives to forceExit.

While forceExit: true can be useful in CI environments, it might mask issues with asynchronous operations or memory leaks.

Consider using --detectOpenHandles and --runInBand options instead to identify and fix the root causes of any hanging processes. If forceExit is necessary, document the reason in a comment.

passWithNoTests: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Reconsider passWithNoTests setting.

While passWithNoTests: true can be useful during development, it might hide issues in a CI pipeline if tests are accidentally skipped or not detected.

Consider setting this to false in your CI environment to ensure that missing tests are caught. If it's intentional for this plugin to sometimes have no tests, document this decision with a comment.

}
2 changes: 1 addition & 1 deletion plugins/delimiter-extractor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"build:watch": "parcel watch",
"build:prod": "NODE_ENV=production parcel build",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand Down
16 changes: 16 additions & 0 deletions plugins/dxp-configure/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider localizing the global setup script.

The global setup script is currently located outside the package directory. For better maintainability and to ensure package-specific setup, consider creating a local copy of this setup script within the package.

This approach would allow for package-specific customizations without affecting other packages.

forceExit: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Reconsider using forceExit.

Setting forceExit to true forces Jest to exit after all tests complete. While this can be useful in CI environments, it may mask issues with asynchronous operations or resources not being properly cleaned up.

Consider the following alternatives:

  1. Remove this option and ensure all asynchronous operations are properly handled in tests.
  2. Use --detectOpenHandles in your test script to identify and fix any hanging processes.
  3. If absolutely necessary, use --forceExit in your test script instead of hardcoding it in the config.

This approach will help maintain cleaner and more reliable tests in the long run.

passWithNoTests: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Reconsider using passWithNoTests.

Setting passWithNoTests to true allows the test suite to pass even when no tests are found. While this can be useful for new packages or work-in-progress features, it might mask the issue of missing tests.

Consider the following alternatives:

  1. Remove this option and ensure that at least one test exists for each package.
  2. Use this option temporarily with a TODO comment to add tests in the future.
  3. If this is intentional for this package, add a comment explaining why no tests are needed.

This approach will help maintain better test coverage and prevent overlooking missing tests.

}
2 changes: 1 addition & 1 deletion plugins/dxp-configure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand Down
16 changes: 16 additions & 0 deletions plugins/export-workbook/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider removing forceExit: true and ensure proper test cleanup.

While forceExit: true can be useful in certain scenarios, it may mask issues with asynchronous operations or resources not being properly cleaned up. It's generally better to ensure all tests properly clean up after themselves.

Consider removing this option and instead focus on proper cleanup in your tests and setup/teardown scripts. If you're having issues with Jest not exiting cleanly, it's often a sign of unhandled promises or timers that haven't been cleared.

If you decide to keep this option, add a comment explaining why it's necessary for this specific plugin.

passWithNoTests: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Reconsider passWithNoTests: true to ensure comprehensive test coverage.

While passWithNoTests: true can be useful during initial development, it may hide the fact that a module lacks tests. This could lead to reduced test coverage over time.

Consider removing this option to ensure that all modules have at least one test. If you decide to keep it, add a comment explaining why it's necessary for this specific plugin and perhaps set a reminder to remove it once tests are in place.

To help ensure comprehensive test coverage, you could run the following script to check for test files corresponding to your source files:

#!/bin/bash
# Description: Check for missing test files

echo "Checking for source files without corresponding test files:"
for src_file in $(find src -name '*.ts' -o -name '*.js'); do
    test_file="${src_file/src/test}"
    test_file="${test_file%.ts}.test.ts"
    test_file="${test_file%.js}.test.js"
    if [ ! -f "$test_file" ]; then
        echo "Missing test file for: $src_file"
    fi
done

}
16 changes: 16 additions & 0 deletions plugins/foreign-db-extractor/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistency Detected in testTimeout Settings

The testTimeout is set to 60_000 milliseconds in most Jest configurations, but it is set to 90_000 milliseconds in the following files:

  • plugins/automap/jest.config.js
  • plugins/webhook-egress/jest.config.js
  • plugins/zip-extractor/jest.config.js

Please verify if the extended timeout for these plugins is necessary. If not, consider standardizing the testTimeout across all Jest configurations to 60_000 milliseconds to maintain consistency.

🔗 Analysis chain

Approved: Test timeout set to 60 seconds.

The 60-second test timeout is appropriate for database operations, which may take longer than typical unit tests. This aligns with the PR objectives mentioning changes to test timing.

To ensure this timeout is consistent across the project, let's check other Jest configurations:


Action Required: Verify testTimeout Consistency Across All Jest Configurations

The previous check did not locate testTimeout settings in other Jest configuration files. To ensure that the 60-second timeout is consistently applied throughout the project, please run the following script:

This will help confirm whether the testTimeout setting is uniformly configured or if adjustments are needed in other Jest config files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent test timeout across Jest configurations

# Test: Search for testTimeout in Jest config files
rg --type js --type ts 'testTimeout' -g '*jest.config.*'

Length of output: 4496


Script:

#!/bin/bash
# Description: Verify the presence of 'testTimeout' in all Jest configuration files

rg --type js --type ts 'testTimeout' -g '*jest.config.*'

Length of output: 2170

globalSetup: '../../test/setup-global.js',
forceExit: true,
passWithNoTests: true,
}
16 changes: 16 additions & 0 deletions plugins/graphql-schema/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',
forceExit: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Reconsider using forceExit: true.

While forceExit: true can be useful in CI environments, it might mask issues with test cleanup or unresolved promises. Consider these alternatives:

  1. Ensure all asynchronous operations in your tests are properly resolved.
  2. Use --detectOpenHandles with Jest to identify and fix issues causing Jest to hang.
  3. If forceExit is necessary, add a comment explaining why.

If you decide to keep forceExit: true, consider adding a comment explaining the reason:

forceExit: true, // Needed due to [specific reason, e.g., "known issue with library X"]

passWithNoTests: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Reconsider using passWithNoTests: true.

While passWithNoTests: true can be useful during development, it might mask issues where tests are accidentally skipped or not discovered. Consider these alternatives:

  1. Ensure that all test files follow a consistent naming convention (e.g., *.test.ts or *.spec.ts).
  2. Use Jest's --findRelatedTests flag in pre-commit hooks to ensure changed files have corresponding tests.
  3. If passWithNoTests is necessary, add a comment explaining why.

If you decide to keep passWithNoTests: true, consider adding a comment explaining the reason:

passWithNoTests: true, // Temporary setting while tests are being developed

}
2 changes: 1 addition & 1 deletion plugins/graphql-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [],
"author": "Flatfile, Inc.",
Expand Down
16 changes: 16 additions & 0 deletions plugins/job-handler/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
testEnvironment: 'node',

transform: {
'^.+\\.tsx?$': 'ts-jest',
},
setupFiles: ['../../test/dotenv-config.js'],
setupFilesAfterEnv: [
'../../test/betterConsoleLog.js',
'../../test/unit.cleanup.js',
],
testTimeout: 60_000,
globalSetup: '../../test/setup-global.js',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider using path.resolve() for globalSetup

The globalSetup configuration is good for setting up the test environment. However, to improve portability, consider using path.resolve():

const path = require('path');

module.exports = {
  // ... other configs
  globalSetup: path.resolve(__dirname, '../../test/setup-global.js'),
  // ... remaining configs
}

This change will make the configuration more resilient to changes in file structure.

forceExit: true,
passWithNoTests: true,
}
2 changes: 1 addition & 1 deletion plugins/job-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"build:watch": "rollup -c --watch",
"build:prod": "NODE_ENV=production rollup -c",
"check": "tsc ./**/*.ts --noEmit --esModuleInterop",
"test": "jest ./**/*.spec.ts --config=../../jest.config.js --runInBand"
"test": "jest src/*.spec.ts"
},
"keywords": [
"flatfile-plugins",
Expand Down
Loading