From b2f1db7d86138210ba2ae019318fa41e3f767dae Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Thu, 3 Oct 2024 12:25:09 -0500 Subject: [PATCH 01/26] shard tests --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b9623869..c1996339e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,9 @@ jobs: timeout-minutes: 20 runs-on: ubuntu-latest if: ${{ github.head_ref != 'changeset-release/main' }} + strategy: + matrix: + shard: [1, 2, 3, 4] steps: - name: Check out code uses: actions/checkout@v3 @@ -22,11 +25,11 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: 'npm' - name: Install dependencies run: npm ci - name: Test - run: npm run test + run: npm test --shard=${{ matrix.shard }}/${{ strategy.job-total }} From 663b23fa1e5e5890e6918d14f27a62317fac784b Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Thu, 3 Oct 2024 16:08:05 -0500 Subject: [PATCH 02/26] replace turbo test with just jest --- package.json | 2 +- turbo.json | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/package.json b/package.json index 2a91d0bef..425ca481b 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ ], "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", "build:prod": "turbo build:prod", "build:clean": "npm run clean && npm i && turbo build", diff --git a/turbo.json b/turbo.json index 7cdb5c0aa..50396e28b 100644 --- a/turbo.json +++ b/turbo.json @@ -8,9 +8,6 @@ "build:prod": { "outputs": ["dist/**"], "dependsOn": ["^build:prod"] - }, - "test": { - "inputs": ["**/*.spec.ts"] } } } From 9ed97519cbdad0e9f39c3a65c957f7f46fa56368 Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Thu, 3 Oct 2024 16:10:48 -0500 Subject: [PATCH 03/26] add build step --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1996339e..3055a629c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,5 +31,8 @@ jobs: - name: Install dependencies run: npm ci + - name: Build + run: npm run build + - name: Test run: npm test --shard=${{ matrix.shard }}/${{ strategy.job-total }} From 3d11c1444a53e02af1e1654a3f6389c5381fbebe Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Thu, 3 Oct 2024 23:25:44 -0600 Subject: [PATCH 04/26] feat: tweak concurrency --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3055a629c..c05812155 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,13 +4,13 @@ on: pull_request: 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 + timeout-minutes: 30 runs-on: ubuntu-latest if: ${{ github.head_ref != 'changeset-release/main' }} strategy: From 3252141fd0ccf1c54b30df768ca6527b52aef58f Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Thu, 3 Oct 2024 23:35:40 -0600 Subject: [PATCH 05/26] feat: another try --- .github/workflows/test.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c05812155..bc0ea0b7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,21 +1,36 @@ name: Test - on: pull_request: branches: - main + push: + branches: + - main + concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' cancel-in-progress: true + jobs: + determine-packages: + runs-on: ubuntu-latest + outputs: + packages: ${{ steps.set-packages.outputs.packages }} + steps: + - uses: actions/checkout@v3 + - id: set-packages + run: echo "packages=$(ls -d packages/* | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT + test: + needs: determine-packages name: Test timeout-minutes: 30 runs-on: ubuntu-latest if: ${{ github.head_ref != 'changeset-release/main' }} strategy: matrix: - shard: [1, 2, 3, 4] + package: ${{fromJson(needs.determine-packages.outputs.packages)}} + fail-fast: false steps: - name: Check out code uses: actions/checkout@v3 @@ -35,4 +50,4 @@ jobs: run: npm run build - name: Test - run: npm test --shard=${{ matrix.shard }}/${{ strategy.job-total }} + run: npm test --scope=${{ matrix.package }} From 56664e60e4231a8000579cd1f0ac4514345c8254 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Thu, 3 Oct 2024 23:39:07 -0600 Subject: [PATCH 06/26] feat: another try --- .github/workflows/test.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc0ea0b7c..8a562664d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,9 +17,13 @@ jobs: outputs: packages: ${{ steps.set-packages.outputs.packages }} steps: - - uses: actions/checkout@v3 - - id: set-packages - run: echo "packages=$(ls -d packages/* | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT + - uses: actions/checkout@v4 + - name: Get package directories + id: set-packages + run: | + PACKAGES=$(find packages -maxdepth 1 -type d | tail -n +2 | jq -R -s -c 'split("\n")[:-1]') + echo "packages=$PACKAGES" >> $GITHUB_OUTPUT + echo "Found packages: $PACKAGES" test: needs: determine-packages @@ -33,12 +37,10 @@ jobs: 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: 18 cache: 'npm' @@ -50,4 +52,4 @@ jobs: run: npm run build - name: Test - run: npm test --scope=${{ matrix.package }} + run: npm test -- --selectProjects $(basename ${{ matrix.package }}) From 542004f3b407e8fa4c1d34a7961c9a49f0f0c19d Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Thu, 3 Oct 2024 23:44:16 -0600 Subject: [PATCH 07/26] feat: another try --- .github/workflows/test.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a562664d..90e0e3ab5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,18 @@ jobs: - name: Get package directories id: set-packages run: | - PACKAGES=$(find packages -maxdepth 1 -type d | tail -n +2 | jq -R -s -c 'split("\n")[:-1]') + # List of directories to search for packages + SEARCH_DIRS="plugins utils validate convert enrich import export" + + # Find packages in all specified directories + PACKAGES=$( + for dir in $SEARCH_DIRS; do + if [ -d "$dir" ]; then + find "$dir" -maxdepth 1 -mindepth 1 -type d + fi + done | jq -R -s -c 'split("\n")[:-1]' + ) + echo "packages=$PACKAGES" >> $GITHUB_OUTPUT echo "Found packages: $PACKAGES" @@ -52,4 +63,6 @@ jobs: run: npm run build - name: Test - run: npm test -- --selectProjects $(basename ${{ matrix.package }}) + run: | + PACKAGE_NAME=$(basename ${{ matrix.package }}) + npm test -- --selectProjects $PACKAGE_NAME From 2f207ed631bf8078c0b1a3f6ef2b084c312a4a86 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Thu, 3 Oct 2024 23:56:55 -0600 Subject: [PATCH 08/26] feat: use turbo filter --- .github/workflows/test.yml | 2 +- package.json | 1 + turbo.json | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90e0e3ab5..913517845 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,4 +65,4 @@ jobs: - name: Test run: | PACKAGE_NAME=$(basename ${{ matrix.package }}) - npm test -- --selectProjects $PACKAGE_NAME + npm run turbo:test --filter=$PACKAGE_NAME diff --git a/package.json b/package.json index 425ca481b..8e9ab59c1 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "clean": "find ./ '(' -name 'node_modules' -o -name 'dist' -o -name '.turbo' -o -name '.parcel-cache' ')' -type d -exec rm -rf {} +", "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", diff --git a/turbo.json b/turbo.json index 50396e28b..662abe3a9 100644 --- a/turbo.json +++ b/turbo.json @@ -8,6 +8,7 @@ "build:prod": { "outputs": ["dist/**"], "dependsOn": ["^build:prod"] - } + }, + "test": {} } } From 9d89fdbf91e3eba9a1ad3cfe1086cd1d09848cb7 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 00:04:34 -0600 Subject: [PATCH 09/26] feat: new test naming --- .github/workflows/test.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 913517845..014d2be48 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,18 +21,16 @@ jobs: - name: Get package directories id: set-packages run: | - # List of directories to search for packages SEARCH_DIRS="plugins utils validate convert enrich import export" - - # Find packages in all specified directories + PACKAGES=$( for dir in $SEARCH_DIRS; do if [ -d "$dir" ]; then - find "$dir" -maxdepth 1 -mindepth 1 -type d + find "$dir" -maxdepth 1 -mindepth 1 -type d -printf "%P\n" fi done | jq -R -s -c 'split("\n")[:-1]' ) - + echo "packages=$PACKAGES" >> $GITHUB_OUTPUT echo "Found packages: $PACKAGES" @@ -63,6 +61,4 @@ jobs: run: npm run build - name: Test - run: | - PACKAGE_NAME=$(basename ${{ matrix.package }}) - npm run turbo:test --filter=$PACKAGE_NAME + run: npx turbo run test --filter=${{ matrix.package }} From c35f1f2fac59be7f8fc188266c04dde645948a6e Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 00:09:31 -0600 Subject: [PATCH 10/26] feat: another name test --- .github/workflows/test.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 014d2be48..a93226125 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,19 +18,24 @@ jobs: packages: ${{ steps.set-packages.outputs.packages }} steps: - uses: actions/checkout@v4 - - name: Get package directories + - name: Get package names from package.json 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 1 -mindepth 1 -type d -printf "%P\n" + 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" @@ -58,7 +63,7 @@ jobs: run: npm ci - name: Build - run: npm run build + run: npx turbo run build --filter=${{ matrix.package }} - name: Test run: npx turbo run test --filter=${{ matrix.package }} From 9012b812d69b4a280b967295477b9aac3a2a64ab Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 00:12:57 -0600 Subject: [PATCH 11/26] feat: build all packages for each test --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a93226125..6f5a70bb7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,7 @@ jobs: run: npm ci - name: Build - run: npx turbo run build --filter=${{ matrix.package }} + run: npx turbo run build - name: Test run: npx turbo run test --filter=${{ matrix.package }} From 2ea844a5ac99a999280deb44c512a8e9be45ea0d Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 00:42:19 -0600 Subject: [PATCH 12/26] feat: only test the current directory --- jest.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 888b65654..45d2dd0c5 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,7 @@ module.exports = { testEnvironment: 'node', - testRegex: '.*\\.(e2e-)?spec\\.ts$', + // testRegex: '.*\\.(e2e-)?spec\\.ts$', + testMatch: ['/src/**/*.spec.ts'], transform: { '^.+\\.tsx?$': 'ts-jest', }, @@ -12,4 +13,6 @@ module.exports = { testTimeout: 60_000, globalSetup: '/test/setup-global.js', forceExit: true, + passWithNoTests: true, + detectOpenHandles: true, } From ab57df93f522027112e0d3b274ccb039210722ca Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 00:57:56 -0600 Subject: [PATCH 13/26] feat: remove runInBand --- convert/what3words/package.json | 4 ++-- jest.config.js | 4 ++-- plugins/autocast/package.json | 2 +- plugins/automap/package.json | 2 +- plugins/constraints/package.json | 2 +- plugins/dedupe/package.json | 2 +- plugins/delimiter-extractor/package.json | 2 +- plugins/dxp-configure/package.json | 2 +- plugins/graphql-schema/package.json | 2 +- plugins/job-handler/package.json | 2 +- plugins/json-extractor/package.json | 2 +- plugins/json-schema/package.json | 2 +- plugins/openapi-schema/package.json | 2 +- plugins/record-hook/package.json | 2 +- plugins/rollout/package.json | 2 +- plugins/space-configure/package.json | 2 +- plugins/view-mapped/package.json | 2 +- plugins/webhook-egress/package.json | 2 +- plugins/webhook-event-forwarder/package.json | 2 +- plugins/xlsx-extractor/package.json | 2 +- plugins/xml-extractor/package.json | 2 +- plugins/yaml-schema/package.json | 2 +- plugins/zip-extractor/package.json | 2 +- support/common-utils/package.json | 2 +- utils/common/package.json | 2 +- utils/testing/package.json | 2 +- 26 files changed, 28 insertions(+), 28 deletions(-) diff --git a/convert/what3words/package.json b/convert/what3words/package.json index e8335d06d..96733e392 100644 --- a/convert/what3words/package.json +++ b/convert/what3words/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", @@ -60,4 +60,4 @@ "devDependencies": { "@flatfile/rollup-config": "0.1.1" } -} \ No newline at end of file +} diff --git a/jest.config.js b/jest.config.js index 45d2dd0c5..dbbf2efdc 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ module.exports = { testEnvironment: 'node', - // testRegex: '.*\\.(e2e-)?spec\\.ts$', - testMatch: ['/src/**/*.spec.ts'], + testRegex: '.*\\.(e2e-)?spec\\.ts$', + // testMatch: ['/src/**/*.spec.ts', '/src/**/*.e2e.spec.ts'], transform: { '^.+\\.tsx?$': 'ts-jest', }, diff --git a/plugins/autocast/package.json b/plugins/autocast/package.json index 79402c946..b1b4186bb 100644 --- a/plugins/autocast/package.json +++ b/plugins/autocast/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/automap/package.json b/plugins/automap/package.json index 2d9162879..063278ee9 100644 --- a/plugins/automap/package.json +++ b/plugins/automap/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/constraints/package.json b/plugins/constraints/package.json index 2a686f87d..06b71f593 100644 --- a/plugins/constraints/package.json +++ b/plugins/constraints/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [], "author": "David Boskovic", diff --git a/plugins/dedupe/package.json b/plugins/dedupe/package.json index f2dd8f660..19a978e8c 100644 --- a/plugins/dedupe/package.json +++ b/plugins/dedupe/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/delimiter-extractor/package.json b/plugins/delimiter-extractor/package.json index 44dcbb4a5..89f519a40 100644 --- a/plugins/delimiter-extractor/package.json +++ b/plugins/delimiter-extractor/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/dxp-configure/package.json b/plugins/dxp-configure/package.json index 9e6130be2..c3124d6c0 100644 --- a/plugins/dxp-configure/package.json +++ b/plugins/dxp-configure/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/graphql-schema/package.json b/plugins/graphql-schema/package.json index f17f0fd3a..edbfbe46f 100644 --- a/plugins/graphql-schema/package.json +++ b/plugins/graphql-schema/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [], "author": "Flatfile, Inc.", diff --git a/plugins/job-handler/package.json b/plugins/job-handler/package.json index 8e05fefdf..bfcb0f445 100644 --- a/plugins/job-handler/package.json +++ b/plugins/job-handler/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/json-extractor/package.json b/plugins/json-extractor/package.json index 3aa2bcdf9..84597d615 100644 --- a/plugins/json-extractor/package.json +++ b/plugins/json-extractor/package.json @@ -38,7 +38,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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/json-schema/package.json b/plugins/json-schema/package.json index 815a16d41..6c20c24f7 100644 --- a/plugins/json-schema/package.json +++ b/plugins/json-schema/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/openapi-schema/package.json b/plugins/openapi-schema/package.json index c129ccd4b..d49dc350f 100644 --- a/plugins/openapi-schema/package.json +++ b/plugins/openapi-schema/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/record-hook/package.json b/plugins/record-hook/package.json index 399934df6..9077c70b2 100644 --- a/plugins/record-hook/package.json +++ b/plugins/record-hook/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/rollout/package.json b/plugins/rollout/package.json index 17f67e346..b79ac1192 100644 --- a/plugins/rollout/package.json +++ b/plugins/rollout/package.json @@ -21,7 +21,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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/space-configure/package.json b/plugins/space-configure/package.json index aed74120d..96d596836 100644 --- a/plugins/space-configure/package.json +++ b/plugins/space-configure/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/view-mapped/package.json b/plugins/view-mapped/package.json index bbb0d6c0b..00ec9c7d1 100644 --- a/plugins/view-mapped/package.json +++ b/plugins/view-mapped/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-egress/package.json b/plugins/webhook-egress/package.json index e5f028ccf..e10c71318 100644 --- a/plugins/webhook-egress/package.json +++ b/plugins/webhook-egress/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-event-forwarder/package.json b/plugins/webhook-event-forwarder/package.json index 39431fc4a..ab53e7c03 100644 --- a/plugins/webhook-event-forwarder/package.json +++ b/plugins/webhook-event-forwarder/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [], "author": "Morgan Daley", diff --git a/plugins/xlsx-extractor/package.json b/plugins/xlsx-extractor/package.json index 14404b7f2..1ff316304 100644 --- a/plugins/xlsx-extractor/package.json +++ b/plugins/xlsx-extractor/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/xml-extractor/package.json b/plugins/xml-extractor/package.json index c4498da42..2ac2d4740 100644 --- a/plugins/xml-extractor/package.json +++ b/plugins/xml-extractor/package.json @@ -17,7 +17,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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/yaml-schema/package.json b/plugins/yaml-schema/package.json index 6662b68f4..c59994a5f 100644 --- a/plugins/yaml-schema/package.json +++ b/plugins/yaml-schema/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/zip-extractor/package.json b/plugins/zip-extractor/package.json index 6cfb9a056..04c2848c0 100644 --- a/plugins/zip-extractor/package.json +++ b/plugins/zip-extractor/package.json @@ -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 ./**/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/support/common-utils/package.json b/support/common-utils/package.json index 834784009..fc3a5686d 100644 --- a/support/common-utils/package.json +++ b/support/common-utils/package.json @@ -21,7 +21,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 ./**/*.spec.ts --config=../../jest.config.js" }, "repository": { "type": "git", diff --git a/utils/common/package.json b/utils/common/package.json index 026db0516..1227b1438 100644 --- a/utils/common/package.json +++ b/utils/common/package.json @@ -35,7 +35,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 ./**/*.spec.ts --config=../../jest.config.js" }, "repository": { "type": "git", diff --git a/utils/testing/package.json b/utils/testing/package.json index 784f92df3..39ec33126 100644 --- a/utils/testing/package.json +++ b/utils/testing/package.json @@ -14,7 +14,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 --detectOpenHandles" + "test": "jest ./**/*.spec.ts --config=../../jest.config.js" }, "author": "Carl Brugger", "repository": { From 1bf951e184bc92e19c6ae3aa8646716575a22e3b Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 01:33:40 -0600 Subject: [PATCH 14/26] feat: scope tests to current directory --- convert/what3words/package.json | 2 +- plugins/autocast/package.json | 2 +- plugins/automap/package.json | 2 +- plugins/constraints/package.json | 2 +- plugins/dedupe/package.json | 2 +- plugins/delimiter-extractor/package.json | 2 +- plugins/dxp-configure/package.json | 2 +- plugins/graphql-schema/package.json | 2 +- plugins/job-handler/package.json | 2 +- plugins/json-extractor/package.json | 2 +- plugins/json-schema/package.json | 2 +- plugins/openapi-schema/package.json | 2 +- plugins/record-hook/package.json | 2 +- plugins/rollout/package.json | 2 +- plugins/space-configure/package.json | 2 +- plugins/view-mapped/package.json | 2 +- plugins/webhook-egress/package.json | 2 +- plugins/webhook-event-forwarder/package.json | 2 +- plugins/xlsx-extractor/package.json | 2 +- plugins/xml-extractor/package.json | 2 +- plugins/yaml-schema/package.json | 2 +- plugins/zip-extractor/package.json | 2 +- support/common-utils/package.json | 2 +- utils/common/package.json | 2 +- utils/testing/package.json | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/convert/what3words/package.json b/convert/what3words/package.json index 96733e392..83f248aa6 100644 --- a/convert/what3words/package.json +++ b/convert/what3words/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/autocast/package.json b/plugins/autocast/package.json index b1b4186bb..7933700c1 100644 --- a/plugins/autocast/package.json +++ b/plugins/autocast/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/automap/package.json b/plugins/automap/package.json index 063278ee9..a13a3ea23 100644 --- a/plugins/automap/package.json +++ b/plugins/automap/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/constraints/package.json b/plugins/constraints/package.json index 06b71f593..1ddc94387 100644 --- a/plugins/constraints/package.json +++ b/plugins/constraints/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [], "author": "David Boskovic", diff --git a/plugins/dedupe/package.json b/plugins/dedupe/package.json index 19a978e8c..3484faace 100644 --- a/plugins/dedupe/package.json +++ b/plugins/dedupe/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/delimiter-extractor/package.json b/plugins/delimiter-extractor/package.json index 89f519a40..d7824b389 100644 --- a/plugins/delimiter-extractor/package.json +++ b/plugins/delimiter-extractor/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/dxp-configure/package.json b/plugins/dxp-configure/package.json index c3124d6c0..6786152a1 100644 --- a/plugins/dxp-configure/package.json +++ b/plugins/dxp-configure/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/graphql-schema/package.json b/plugins/graphql-schema/package.json index edbfbe46f..924aa5c2a 100644 --- a/plugins/graphql-schema/package.json +++ b/plugins/graphql-schema/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [], "author": "Flatfile, Inc.", diff --git a/plugins/job-handler/package.json b/plugins/job-handler/package.json index bfcb0f445..0f675705b 100644 --- a/plugins/job-handler/package.json +++ b/plugins/job-handler/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/json-extractor/package.json b/plugins/json-extractor/package.json index 84597d615..43cec2dc1 100644 --- a/plugins/json-extractor/package.json +++ b/plugins/json-extractor/package.json @@ -38,7 +38,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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/json-schema/package.json b/plugins/json-schema/package.json index 6c20c24f7..0e4e1f9ff 100644 --- a/plugins/json-schema/package.json +++ b/plugins/json-schema/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/openapi-schema/package.json b/plugins/openapi-schema/package.json index d49dc350f..988ecfc89 100644 --- a/plugins/openapi-schema/package.json +++ b/plugins/openapi-schema/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/record-hook/package.json b/plugins/record-hook/package.json index 9077c70b2..726b83d91 100644 --- a/plugins/record-hook/package.json +++ b/plugins/record-hook/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/rollout/package.json b/plugins/rollout/package.json index b79ac1192..bf883e1fe 100644 --- a/plugins/rollout/package.json +++ b/plugins/rollout/package.json @@ -21,7 +21,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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/space-configure/package.json b/plugins/space-configure/package.json index 96d596836..b20b40418 100644 --- a/plugins/space-configure/package.json +++ b/plugins/space-configure/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/view-mapped/package.json b/plugins/view-mapped/package.json index 00ec9c7d1..d0e098b3d 100644 --- a/plugins/view-mapped/package.json +++ b/plugins/view-mapped/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-egress/package.json b/plugins/webhook-egress/package.json index e10c71318..a6711a961 100644 --- a/plugins/webhook-egress/package.json +++ b/plugins/webhook-egress/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-event-forwarder/package.json b/plugins/webhook-event-forwarder/package.json index ab53e7c03..425462958 100644 --- a/plugins/webhook-event-forwarder/package.json +++ b/plugins/webhook-event-forwarder/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [], "author": "Morgan Daley", diff --git a/plugins/xlsx-extractor/package.json b/plugins/xlsx-extractor/package.json index 1ff316304..3abfc3dc9 100644 --- a/plugins/xlsx-extractor/package.json +++ b/plugins/xlsx-extractor/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/xml-extractor/package.json b/plugins/xml-extractor/package.json index 2ac2d4740..e32112234 100644 --- a/plugins/xml-extractor/package.json +++ b/plugins/xml-extractor/package.json @@ -17,7 +17,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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/yaml-schema/package.json b/plugins/yaml-schema/package.json index c59994a5f..1cf63d12b 100644 --- a/plugins/yaml-schema/package.json +++ b/plugins/yaml-schema/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/zip-extractor/package.json b/plugins/zip-extractor/package.json index 04c2848c0..37a100c71 100644 --- a/plugins/zip-extractor/package.json +++ b/plugins/zip-extractor/package.json @@ -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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "keywords": [ "flatfile-plugins", diff --git a/support/common-utils/package.json b/support/common-utils/package.json index fc3a5686d..cb816fd80 100644 --- a/support/common-utils/package.json +++ b/support/common-utils/package.json @@ -21,7 +21,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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "repository": { "type": "git", diff --git a/utils/common/package.json b/utils/common/package.json index 1227b1438..bf7ec736d 100644 --- a/utils/common/package.json +++ b/utils/common/package.json @@ -35,7 +35,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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "repository": { "type": "git", diff --git a/utils/testing/package.json b/utils/testing/package.json index 39ec33126..87a8dbb5e 100644 --- a/utils/testing/package.json +++ b/utils/testing/package.json @@ -14,7 +14,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" + "test": "jest src/*.spec.ts --config=../../jest.config.js" }, "author": "Carl Brugger", "repository": { From 2524e4672477727b88b49d8298e0e16d8ef92638 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 01:44:48 -0600 Subject: [PATCH 15/26] feat: remove detectOpenHandles --- jest.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index dbbf2efdc..545d25d8e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -14,5 +14,4 @@ module.exports = { globalSetup: '/test/setup-global.js', forceExit: true, passWithNoTests: true, - detectOpenHandles: true, } From e5b35c83dc7bda6b4fa1b877750a320aa6c490e8 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 02:01:16 -0600 Subject: [PATCH 16/26] feat: localize each jest config --- convert/what3words/jest.config.js | 16 ++++++++++++++++ convert/what3words/package.json | 2 +- jest.config.js | 5 +++-- plugins/autocast/jest.config.js | 16 ++++++++++++++++ plugins/autocast/package.json | 2 +- plugins/automap/jest.config.js | 16 ++++++++++++++++ plugins/automap/package.json | 2 +- plugins/constraints/jest.config.js | 16 ++++++++++++++++ plugins/constraints/package.json | 2 +- plugins/dedupe/jest.config.js | 16 ++++++++++++++++ plugins/dedupe/package.json | 2 +- plugins/delimiter-extractor/jest.config.js | 16 ++++++++++++++++ plugins/delimiter-extractor/package.json | 2 +- plugins/dxp-configure/jest.config.js | 16 ++++++++++++++++ plugins/dxp-configure/package.json | 2 +- plugins/export-workbook/jest.config.js | 16 ++++++++++++++++ plugins/foreign-db-extractor/jest.config.js | 16 ++++++++++++++++ plugins/graphql-schema/jest.config.js | 16 ++++++++++++++++ plugins/graphql-schema/package.json | 2 +- plugins/job-handler/jest.config.js | 16 ++++++++++++++++ plugins/job-handler/package.json | 2 +- plugins/json-extractor/jest.config.js | 16 ++++++++++++++++ plugins/json-extractor/package.json | 2 +- plugins/json-schema/jest.config.js | 16 ++++++++++++++++ plugins/json-schema/package.json | 2 +- plugins/merge-connection/jest.config.js | 16 ++++++++++++++++ plugins/openapi-schema/jest.config.js | 16 ++++++++++++++++ plugins/openapi-schema/package.json | 2 +- plugins/pdf-extractor/jest.config.js | 16 ++++++++++++++++ plugins/psv-extractor/jest.config.js | 16 ++++++++++++++++ plugins/record-hook/jest.config.js | 16 ++++++++++++++++ plugins/record-hook/package.json | 2 +- plugins/rollout/jest.config.js | 16 ++++++++++++++++ plugins/rollout/package.json | 2 +- plugins/space-configure/jest.config.js | 16 ++++++++++++++++ plugins/space-configure/package.json | 2 +- plugins/sql-ddl-converter/jest.config.js | 16 ++++++++++++++++ plugins/tsv-extractor/jest.config.js | 16 ++++++++++++++++ plugins/view-mapped/jest.config.js | 16 ++++++++++++++++ plugins/view-mapped/package.json | 2 +- plugins/webhook-egress/jest.config.js | 16 ++++++++++++++++ plugins/webhook-egress/package.json | 2 +- plugins/webhook-event-forwarder/jest.config.js | 16 ++++++++++++++++ plugins/webhook-event-forwarder/package.json | 2 +- plugins/xlsx-extractor/jest.config.js | 16 ++++++++++++++++ plugins/xlsx-extractor/package.json | 2 +- plugins/xml-extractor/jest.config.js | 16 ++++++++++++++++ plugins/xml-extractor/package.json | 2 +- plugins/yaml-schema/jest.config.js | 16 ++++++++++++++++ plugins/yaml-schema/package.json | 2 +- plugins/zip-extractor/jest.config.js | 16 ++++++++++++++++ plugins/zip-extractor/package.json | 2 +- support/common-utils/package.json | 2 +- utils/common/jest.config.js | 16 ++++++++++++++++ utils/common/package.json | 2 +- utils/extractor/jest.config.js | 16 ++++++++++++++++ utils/fetch-schema/jest.config.js | 16 ++++++++++++++++ utils/file-buffer/jest.config.js | 16 ++++++++++++++++ utils/response-rejection/jest.config.js | 16 ++++++++++++++++ utils/testing/jest.config.js | 16 ++++++++++++++++ utils/testing/package.json | 2 +- 61 files changed, 588 insertions(+), 27 deletions(-) create mode 100644 convert/what3words/jest.config.js create mode 100644 plugins/autocast/jest.config.js create mode 100644 plugins/automap/jest.config.js create mode 100644 plugins/constraints/jest.config.js create mode 100644 plugins/dedupe/jest.config.js create mode 100644 plugins/delimiter-extractor/jest.config.js create mode 100644 plugins/dxp-configure/jest.config.js create mode 100644 plugins/export-workbook/jest.config.js create mode 100644 plugins/foreign-db-extractor/jest.config.js create mode 100644 plugins/graphql-schema/jest.config.js create mode 100644 plugins/job-handler/jest.config.js create mode 100644 plugins/json-extractor/jest.config.js create mode 100644 plugins/json-schema/jest.config.js create mode 100644 plugins/merge-connection/jest.config.js create mode 100644 plugins/openapi-schema/jest.config.js create mode 100644 plugins/pdf-extractor/jest.config.js create mode 100644 plugins/psv-extractor/jest.config.js create mode 100644 plugins/record-hook/jest.config.js create mode 100644 plugins/rollout/jest.config.js create mode 100644 plugins/space-configure/jest.config.js create mode 100644 plugins/sql-ddl-converter/jest.config.js create mode 100644 plugins/tsv-extractor/jest.config.js create mode 100644 plugins/view-mapped/jest.config.js create mode 100644 plugins/webhook-egress/jest.config.js create mode 100644 plugins/webhook-event-forwarder/jest.config.js create mode 100644 plugins/xlsx-extractor/jest.config.js create mode 100644 plugins/xml-extractor/jest.config.js create mode 100644 plugins/yaml-schema/jest.config.js create mode 100644 plugins/zip-extractor/jest.config.js create mode 100644 utils/common/jest.config.js create mode 100644 utils/extractor/jest.config.js create mode 100644 utils/fetch-schema/jest.config.js create mode 100644 utils/file-buffer/jest.config.js create mode 100644 utils/response-rejection/jest.config.js create mode 100644 utils/testing/jest.config.js diff --git a/convert/what3words/jest.config.js b/convert/what3words/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/convert/what3words/jest.config.js @@ -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, +} diff --git a/convert/what3words/package.json b/convert/what3words/package.json index 83f248aa6..5480d6b49 100644 --- a/convert/what3words/package.json +++ b/convert/what3words/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/jest.config.js b/jest.config.js index 545d25d8e..e93a2c6eb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,8 @@ module.exports = { testEnvironment: 'node', - testRegex: '.*\\.(e2e-)?spec\\.ts$', - // testMatch: ['/src/**/*.spec.ts', '/src/**/*.e2e.spec.ts'], + // testRegex: '(?/**/**/src/*.spec.ts'], + transform: { '^.+\\.tsx?$': 'ts-jest', }, diff --git a/plugins/autocast/jest.config.js b/plugins/autocast/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/autocast/jest.config.js @@ -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, +} diff --git a/plugins/autocast/package.json b/plugins/autocast/package.json index 7933700c1..8fc2447b8 100644 --- a/plugins/autocast/package.json +++ b/plugins/autocast/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/automap/jest.config.js b/plugins/automap/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/automap/jest.config.js @@ -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, +} diff --git a/plugins/automap/package.json b/plugins/automap/package.json index a13a3ea23..0a4b01a0f 100644 --- a/plugins/automap/package.json +++ b/plugins/automap/package.json @@ -18,7 +18,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/constraints/jest.config.js b/plugins/constraints/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/constraints/jest.config.js @@ -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, +} diff --git a/plugins/constraints/package.json b/plugins/constraints/package.json index 1ddc94387..50f8b63d6 100644 --- a/plugins/constraints/package.json +++ b/plugins/constraints/package.json @@ -36,7 +36,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [], "author": "David Boskovic", diff --git a/plugins/dedupe/jest.config.js b/plugins/dedupe/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/dedupe/jest.config.js @@ -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, +} diff --git a/plugins/dedupe/package.json b/plugins/dedupe/package.json index 3484faace..0f258cb3e 100644 --- a/plugins/dedupe/package.json +++ b/plugins/dedupe/package.json @@ -36,7 +36,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/delimiter-extractor/jest.config.js b/plugins/delimiter-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/delimiter-extractor/jest.config.js @@ -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, +} diff --git a/plugins/delimiter-extractor/package.json b/plugins/delimiter-extractor/package.json index d7824b389..b0a7ba6b6 100644 --- a/plugins/delimiter-extractor/package.json +++ b/plugins/delimiter-extractor/package.json @@ -18,7 +18,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/dxp-configure/jest.config.js b/plugins/dxp-configure/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/dxp-configure/jest.config.js @@ -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, +} diff --git a/plugins/dxp-configure/package.json b/plugins/dxp-configure/package.json index 6786152a1..b88d9a472 100644 --- a/plugins/dxp-configure/package.json +++ b/plugins/dxp-configure/package.json @@ -42,7 +42,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/export-workbook/jest.config.js b/plugins/export-workbook/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/export-workbook/jest.config.js @@ -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, +} diff --git a/plugins/foreign-db-extractor/jest.config.js b/plugins/foreign-db-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/foreign-db-extractor/jest.config.js @@ -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, +} diff --git a/plugins/graphql-schema/jest.config.js b/plugins/graphql-schema/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/graphql-schema/jest.config.js @@ -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, +} diff --git a/plugins/graphql-schema/package.json b/plugins/graphql-schema/package.json index 924aa5c2a..cf8333579 100644 --- a/plugins/graphql-schema/package.json +++ b/plugins/graphql-schema/package.json @@ -27,7 +27,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [], "author": "Flatfile, Inc.", diff --git a/plugins/job-handler/jest.config.js b/plugins/job-handler/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/job-handler/jest.config.js @@ -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, +} diff --git a/plugins/job-handler/package.json b/plugins/job-handler/package.json index 0f675705b..f68c1a402 100644 --- a/plugins/job-handler/package.json +++ b/plugins/job-handler/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/json-extractor/jest.config.js b/plugins/json-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/json-extractor/jest.config.js @@ -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, +} diff --git a/plugins/json-extractor/package.json b/plugins/json-extractor/package.json index 43cec2dc1..8ecdedd32 100644 --- a/plugins/json-extractor/package.json +++ b/plugins/json-extractor/package.json @@ -38,7 +38,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/json-schema/jest.config.js b/plugins/json-schema/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/json-schema/jest.config.js @@ -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, +} diff --git a/plugins/json-schema/package.json b/plugins/json-schema/package.json index 0e4e1f9ff..a755ecc62 100644 --- a/plugins/json-schema/package.json +++ b/plugins/json-schema/package.json @@ -18,7 +18,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/merge-connection/jest.config.js b/plugins/merge-connection/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/merge-connection/jest.config.js @@ -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, +} diff --git a/plugins/openapi-schema/jest.config.js b/plugins/openapi-schema/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/openapi-schema/jest.config.js @@ -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, +} diff --git a/plugins/openapi-schema/package.json b/plugins/openapi-schema/package.json index 988ecfc89..db6789306 100644 --- a/plugins/openapi-schema/package.json +++ b/plugins/openapi-schema/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/pdf-extractor/jest.config.js b/plugins/pdf-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/pdf-extractor/jest.config.js @@ -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, +} diff --git a/plugins/psv-extractor/jest.config.js b/plugins/psv-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/psv-extractor/jest.config.js @@ -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, +} diff --git a/plugins/record-hook/jest.config.js b/plugins/record-hook/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/record-hook/jest.config.js @@ -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, +} diff --git a/plugins/record-hook/package.json b/plugins/record-hook/package.json index 726b83d91..8e2bcdead 100644 --- a/plugins/record-hook/package.json +++ b/plugins/record-hook/package.json @@ -42,7 +42,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/rollout/jest.config.js b/plugins/rollout/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/rollout/jest.config.js @@ -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, +} diff --git a/plugins/rollout/package.json b/plugins/rollout/package.json index bf883e1fe..1d2fb3baa 100644 --- a/plugins/rollout/package.json +++ b/plugins/rollout/package.json @@ -21,7 +21,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/space-configure/jest.config.js b/plugins/space-configure/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/space-configure/jest.config.js @@ -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, +} diff --git a/plugins/space-configure/package.json b/plugins/space-configure/package.json index b20b40418..9b88ffc53 100644 --- a/plugins/space-configure/package.json +++ b/plugins/space-configure/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/sql-ddl-converter/jest.config.js b/plugins/sql-ddl-converter/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/sql-ddl-converter/jest.config.js @@ -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, +} diff --git a/plugins/tsv-extractor/jest.config.js b/plugins/tsv-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/tsv-extractor/jest.config.js @@ -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, +} diff --git a/plugins/view-mapped/jest.config.js b/plugins/view-mapped/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/view-mapped/jest.config.js @@ -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, +} diff --git a/plugins/view-mapped/package.json b/plugins/view-mapped/package.json index d0e098b3d..607ebebe8 100644 --- a/plugins/view-mapped/package.json +++ b/plugins/view-mapped/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-egress/jest.config.js b/plugins/webhook-egress/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/webhook-egress/jest.config.js @@ -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, +} diff --git a/plugins/webhook-egress/package.json b/plugins/webhook-egress/package.json index a6711a961..29ca42a8f 100644 --- a/plugins/webhook-egress/package.json +++ b/plugins/webhook-egress/package.json @@ -37,7 +37,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-event-forwarder/jest.config.js b/plugins/webhook-event-forwarder/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/webhook-event-forwarder/jest.config.js @@ -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, +} diff --git a/plugins/webhook-event-forwarder/package.json b/plugins/webhook-event-forwarder/package.json index 425462958..1671cf6d4 100644 --- a/plugins/webhook-event-forwarder/package.json +++ b/plugins/webhook-event-forwarder/package.json @@ -36,7 +36,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [], "author": "Morgan Daley", diff --git a/plugins/xlsx-extractor/jest.config.js b/plugins/xlsx-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/xlsx-extractor/jest.config.js @@ -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, +} diff --git a/plugins/xlsx-extractor/package.json b/plugins/xlsx-extractor/package.json index 3abfc3dc9..6ae2b9973 100644 --- a/plugins/xlsx-extractor/package.json +++ b/plugins/xlsx-extractor/package.json @@ -18,7 +18,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/xml-extractor/jest.config.js b/plugins/xml-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/xml-extractor/jest.config.js @@ -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, +} diff --git a/plugins/xml-extractor/package.json b/plugins/xml-extractor/package.json index e32112234..2378dcac7 100644 --- a/plugins/xml-extractor/package.json +++ b/plugins/xml-extractor/package.json @@ -17,7 +17,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/yaml-schema/jest.config.js b/plugins/yaml-schema/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/yaml-schema/jest.config.js @@ -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, +} diff --git a/plugins/yaml-schema/package.json b/plugins/yaml-schema/package.json index 1cf63d12b..c79e431f3 100644 --- a/plugins/yaml-schema/package.json +++ b/plugins/yaml-schema/package.json @@ -18,7 +18,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/zip-extractor/jest.config.js b/plugins/zip-extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/plugins/zip-extractor/jest.config.js @@ -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, +} diff --git a/plugins/zip-extractor/package.json b/plugins/zip-extractor/package.json index 37a100c71..b9d583e88 100644 --- a/plugins/zip-extractor/package.json +++ b/plugins/zip-extractor/package.json @@ -18,7 +18,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "keywords": [ "flatfile-plugins", diff --git a/support/common-utils/package.json b/support/common-utils/package.json index cb816fd80..f8b98c978 100644 --- a/support/common-utils/package.json +++ b/support/common-utils/package.json @@ -21,7 +21,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "repository": { "type": "git", diff --git a/utils/common/jest.config.js b/utils/common/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/utils/common/jest.config.js @@ -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, +} diff --git a/utils/common/package.json b/utils/common/package.json index bf7ec736d..2edadd936 100644 --- a/utils/common/package.json +++ b/utils/common/package.json @@ -35,7 +35,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "repository": { "type": "git", diff --git a/utils/extractor/jest.config.js b/utils/extractor/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/utils/extractor/jest.config.js @@ -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, +} diff --git a/utils/fetch-schema/jest.config.js b/utils/fetch-schema/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/utils/fetch-schema/jest.config.js @@ -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, +} diff --git a/utils/file-buffer/jest.config.js b/utils/file-buffer/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/utils/file-buffer/jest.config.js @@ -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, +} diff --git a/utils/response-rejection/jest.config.js b/utils/response-rejection/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/utils/response-rejection/jest.config.js @@ -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, +} diff --git a/utils/testing/jest.config.js b/utils/testing/jest.config.js new file mode 100644 index 000000000..e6d7ca40b --- /dev/null +++ b/utils/testing/jest.config.js @@ -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, +} diff --git a/utils/testing/package.json b/utils/testing/package.json index 87a8dbb5e..f3d4dcfe6 100644 --- a/utils/testing/package.json +++ b/utils/testing/package.json @@ -14,7 +14,7 @@ "build:watch": "parcel watch", "build:prod": "NODE_ENV=production parcel build", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --config=../../jest.config.js" + "test": "jest src/*.spec.ts" }, "author": "Carl Brugger", "repository": { From 29346f3697ec2ffeeb535c547b6f001cafa43fd6 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 02:13:28 -0600 Subject: [PATCH 17/26] feat: cjs for some packages --- plugins/foreign-db-extractor/{jest.config.js => jest.config.cjs} | 0 plugins/graphql-schema/{jest.config.js => jest.config.cjs} | 0 plugins/json-extractor/{jest.config.js => jest.config.cjs} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename plugins/foreign-db-extractor/{jest.config.js => jest.config.cjs} (100%) rename plugins/graphql-schema/{jest.config.js => jest.config.cjs} (100%) rename plugins/json-extractor/{jest.config.js => jest.config.cjs} (100%) diff --git a/plugins/foreign-db-extractor/jest.config.js b/plugins/foreign-db-extractor/jest.config.cjs similarity index 100% rename from plugins/foreign-db-extractor/jest.config.js rename to plugins/foreign-db-extractor/jest.config.cjs diff --git a/plugins/graphql-schema/jest.config.js b/plugins/graphql-schema/jest.config.cjs similarity index 100% rename from plugins/graphql-schema/jest.config.js rename to plugins/graphql-schema/jest.config.cjs diff --git a/plugins/json-extractor/jest.config.js b/plugins/json-extractor/jest.config.cjs similarity index 100% rename from plugins/json-extractor/jest.config.js rename to plugins/json-extractor/jest.config.cjs From 4b4d829dbf109ebd09d5c51918daa41e165e480f Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 02:21:43 -0600 Subject: [PATCH 18/26] feat: specific updates --- plugins/constraints/package.json | 2 +- plugins/record-hook/package.json | 2 +- plugins/webhook-egress/jest.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/constraints/package.json b/plugins/constraints/package.json index 50f8b63d6..488634ef1 100644 --- a/plugins/constraints/package.json +++ b/plugins/constraints/package.json @@ -36,7 +36,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts" + "test": "jest src/*.spec.ts --detectOpenHandles" }, "keywords": [], "author": "David Boskovic", diff --git a/plugins/record-hook/package.json b/plugins/record-hook/package.json index 8e2bcdead..133906d0b 100644 --- a/plugins/record-hook/package.json +++ b/plugins/record-hook/package.json @@ -42,7 +42,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts" + "test": "jest src/*.spec.ts --detectOpenHandles" }, "keywords": [ "flatfile-plugins", diff --git a/plugins/webhook-egress/jest.config.js b/plugins/webhook-egress/jest.config.js index e6d7ca40b..00821184f 100644 --- a/plugins/webhook-egress/jest.config.js +++ b/plugins/webhook-egress/jest.config.js @@ -9,7 +9,7 @@ module.exports = { '../../test/betterConsoleLog.js', '../../test/unit.cleanup.js', ], - testTimeout: 60_000, + testTimeout: 600_000, globalSetup: '../../test/setup-global.js', forceExit: true, passWithNoTests: true, From 5eee466bb28dfca117bc23ea6daaed67a2024539 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 02:55:19 -0600 Subject: [PATCH 19/26] feat: some test and timing tweaks --- plugins/automap/jest.config.js | 2 +- plugins/automap/src/automap.plugin.e2e.spec.ts | 4 ++-- plugins/constraints/package.json | 2 +- plugins/constraints/src/external.constraint.e2e.spec.ts | 4 +++- plugins/constraints/src/external.sheet.constraint.e2e.spec.ts | 2 +- plugins/record-hook/src/RecordHook.e2e.spec.ts | 2 ++ plugins/webhook-egress/jest.config.js | 2 +- plugins/zip-extractor/jest.config.js | 2 +- turbo.json | 4 +++- 9 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugins/automap/jest.config.js b/plugins/automap/jest.config.js index e6d7ca40b..97444dbb0 100644 --- a/plugins/automap/jest.config.js +++ b/plugins/automap/jest.config.js @@ -9,7 +9,7 @@ module.exports = { '../../test/betterConsoleLog.js', '../../test/unit.cleanup.js', ], - testTimeout: 60_000, + testTimeout: 90_000, globalSetup: '../../test/setup-global.js', forceExit: true, passWithNoTests: true, diff --git a/plugins/automap/src/automap.plugin.e2e.spec.ts b/plugins/automap/src/automap.plugin.e2e.spec.ts index d0be7d767..724ae7371 100644 --- a/plugins/automap/src/automap.plugin.e2e.spec.ts +++ b/plugins/automap/src/automap.plugin.e2e.spec.ts @@ -62,7 +62,7 @@ describe('automap() e2e', () => { ) expect(mockFn).toHaveBeenCalled() - }, 90_000) + }, 900_000) }) describe('record created - dynamic sheet slug', () => { @@ -106,6 +106,6 @@ describe('automap() e2e', () => { ) expect(mockFn).toHaveBeenCalled() - }, 90_000) + }, 900_000) }) }) diff --git a/plugins/constraints/package.json b/plugins/constraints/package.json index 488634ef1..50f8b63d6 100644 --- a/plugins/constraints/package.json +++ b/plugins/constraints/package.json @@ -36,7 +36,7 @@ "build:watch": "rollup -c --watch", "build:prod": "NODE_ENV=production rollup -c", "check": "tsc ./**/*.ts --noEmit --esModuleInterop", - "test": "jest src/*.spec.ts --detectOpenHandles" + "test": "jest src/*.spec.ts" }, "keywords": [], "author": "David Boskovic", diff --git a/plugins/constraints/src/external.constraint.e2e.spec.ts b/plugins/constraints/src/external.constraint.e2e.spec.ts index 6f94878c3..1d0f895ac 100644 --- a/plugins/constraints/src/external.constraint.e2e.spec.ts +++ b/plugins/constraints/src/external.constraint.e2e.spec.ts @@ -42,7 +42,9 @@ describe('externalConstraint()', () => { it('correctly assigns an error', async () => { await createRecords(sheetId, defaultSimpleValueData) - await listener.waitFor('commit:created') + await listener.waitFor('commit:created', 2) + // Sleep for 1000ms to allow time for the constraint to be applied + // await new Promise(resolve => setTimeout(resolve, 1000)); const records = await getRecords(sheetId) expect(records[0].values['name'].messages[0]).toMatchObject({ type: 'error', diff --git a/plugins/constraints/src/external.sheet.constraint.e2e.spec.ts b/plugins/constraints/src/external.sheet.constraint.e2e.spec.ts index 641ef34be..5b8d2b36f 100644 --- a/plugins/constraints/src/external.sheet.constraint.e2e.spec.ts +++ b/plugins/constraints/src/external.sheet.constraint.e2e.spec.ts @@ -50,7 +50,7 @@ describe('externalConstraint()', () => { it('correctly handles thrown errors', async () => { await createRecords(sheetId, defaultSimpleValueData) - await listener.waitFor('commit:created') + await listener.waitFor('commit:created', 2) const records = await getRecords(sheetId) expect(records[0].values['name'].messages[0]).toMatchObject({ type: 'error', diff --git a/plugins/record-hook/src/RecordHook.e2e.spec.ts b/plugins/record-hook/src/RecordHook.e2e.spec.ts index b753b0a99..1d779b914 100644 --- a/plugins/record-hook/src/RecordHook.e2e.spec.ts +++ b/plugins/record-hook/src/RecordHook.e2e.spec.ts @@ -309,6 +309,8 @@ describe('RecordHook e2e', () => { await createRecords(sheetId, [{ email: 'john@doe.com' }]) await listener.waitFor('commit:created') + // Sleep for 500ms to allow time for the bulk record hook to be applied + await new Promise(resolve => setTimeout(resolve, 500)); const records = await getRecords(sheetId) diff --git a/plugins/webhook-egress/jest.config.js b/plugins/webhook-egress/jest.config.js index 00821184f..97444dbb0 100644 --- a/plugins/webhook-egress/jest.config.js +++ b/plugins/webhook-egress/jest.config.js @@ -9,7 +9,7 @@ module.exports = { '../../test/betterConsoleLog.js', '../../test/unit.cleanup.js', ], - testTimeout: 600_000, + testTimeout: 90_000, globalSetup: '../../test/setup-global.js', forceExit: true, passWithNoTests: true, diff --git a/plugins/zip-extractor/jest.config.js b/plugins/zip-extractor/jest.config.js index e6d7ca40b..97444dbb0 100644 --- a/plugins/zip-extractor/jest.config.js +++ b/plugins/zip-extractor/jest.config.js @@ -9,7 +9,7 @@ module.exports = { '../../test/betterConsoleLog.js', '../../test/unit.cleanup.js', ], - testTimeout: 60_000, + testTimeout: 90_000, globalSetup: '../../test/setup-global.js', forceExit: true, passWithNoTests: true, diff --git a/turbo.json b/turbo.json index 662abe3a9..6dcafd344 100644 --- a/turbo.json +++ b/turbo.json @@ -9,6 +9,8 @@ "outputs": ["dist/**"], "dependsOn": ["^build:prod"] }, - "test": {} + "test": { + "cache": false + } } } From 810345b5d9ea2ba6608681b63b98b1a3ae2cc1f5 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 03:02:51 -0600 Subject: [PATCH 20/26] feat: 900_000 -> 90_000 --- plugins/automap/src/automap.plugin.e2e.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/automap/src/automap.plugin.e2e.spec.ts b/plugins/automap/src/automap.plugin.e2e.spec.ts index 724ae7371..d0be7d767 100644 --- a/plugins/automap/src/automap.plugin.e2e.spec.ts +++ b/plugins/automap/src/automap.plugin.e2e.spec.ts @@ -62,7 +62,7 @@ describe('automap() e2e', () => { ) expect(mockFn).toHaveBeenCalled() - }, 900_000) + }, 90_000) }) describe('record created - dynamic sheet slug', () => { @@ -106,6 +106,6 @@ describe('automap() e2e', () => { ) expect(mockFn).toHaveBeenCalled() - }, 900_000) + }, 90_000) }) }) From fdef447c6a4b035bd88abd3c6fd68be8fb6d813d Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 03:13:15 -0600 Subject: [PATCH 21/26] feat: add a final Test check --- .github/workflows/test.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f5a70bb7..883d7b59a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: packages: ${{ steps.set-packages.outputs.packages }} steps: - uses: actions/checkout@v4 - - name: Get package names from package.json + - name: Get package names id: set-packages run: | SEARCH_DIRS="plugins utils validate convert enrich import export" @@ -39,10 +39,9 @@ jobs: echo "packages=$PACKAGES" >> $GITHUB_OUTPUT echo "Found packages: $PACKAGES" - test: + test-packages: needs: determine-packages - name: Test - timeout-minutes: 30 + name: Test ${{ matrix.package }} runs-on: ubuntu-latest if: ${{ github.head_ref != 'changeset-release/main' }} strategy: @@ -63,7 +62,17 @@ jobs: run: npm ci - name: Build - run: npx turbo run build + run: npx turbo run build --filter=${{ matrix.package }} - name: 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 From 3fa51940608706a8677feb44935325d5445e74ba Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 03:18:04 -0600 Subject: [PATCH 22/26] feat: cleanup --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 883d7b59a..7a5940bc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: test-packages: needs: determine-packages - name: Test ${{ matrix.package }} + name: "**Test (${{ matrix.package }})**" runs-on: ubuntu-latest if: ${{ github.head_ref != 'changeset-release/main' }} strategy: @@ -62,7 +62,7 @@ jobs: run: npm ci - name: Build - run: npx turbo run build --filter=${{ matrix.package }} + run: npx turbo run build - name: Test run: npx turbo run test --filter=${{ matrix.package }} From fd25aac72e71cdffc9fb69e189b3386e8fa44c00 Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Fri, 4 Oct 2024 03:25:39 -0600 Subject: [PATCH 23/26] feat: remove bold attempt --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7a5940bc6..ff976bee1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: test-packages: needs: determine-packages - name: "**Test (${{ matrix.package }})**" + name: Test (${{ matrix.package }}) runs-on: ubuntu-latest if: ${{ github.head_ref != 'changeset-release/main' }} strategy: From 66060fdf4b65f6dcdec5b0bc70ae3a6b00b04016 Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Fri, 4 Oct 2024 12:24:25 -0500 Subject: [PATCH 24/26] attempt caching deps & build --- .github/workflows/test.yml | 82 +++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff976bee1..e145f6a28 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: id: set-packages run: | SEARCH_DIRS="plugins utils validate convert enrich import export" - + PACKAGES=$( for dir in $SEARCH_DIRS; do if [ -d "$dir" ]; then @@ -35,23 +35,31 @@ jobs: fi done | jq -R -s -c 'split("\n")[:-1]' ) - + echo "packages=$PACKAGES" >> $GITHUB_OUTPUT echo "Found packages: $PACKAGES" - test-packages: - needs: determine-packages - name: Test (${{ matrix.package }}) + # New build job that runs once and produces build output and dependencies + build: runs-on: ubuntu-latest - if: ${{ github.head_ref != 'changeset-release/main' }} - strategy: - matrix: - package: ${{fromJson(needs.determine-packages.outputs.packages)}} - fail-fast: false + outputs: + cache-key: ${{ steps.cache-deps.outputs.cache-key }} steps: - name: Check out code uses: actions/checkout@v4 + # Cache Node.js dependencies + - name: Cache Node.js dependencies + id: cache-deps + uses: actions/cache@v3 + with: + path: | + node_modules + **/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Setup Node.js environment uses: actions/setup-node@v4 with: @@ -61,9 +69,63 @@ jobs: - name: Install dependencies run: npm ci + # Cache build output + - name: Cache build output + uses: actions/cache@v3 + with: + path: | + build + dist + key: ${{ runner.os }}-build-${{ hashFiles('**/package.json', '**/tsconfig.json') }} + restore-keys: | + ${{ runner.os }}-build- + - name: Build run: npx turbo run build + # Upload build and node_modules as artifacts to be shared with test jobs + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: build-output + path: | + build + dist + + - name: Upload node_modules + uses: actions/upload-artifact@v3 + with: + name: node-modules + path: node_modules + + test-packages: + needs: [determine-packages, build] + name: Test (${{ 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@v4 + + # Download node_modules from the build job artifact + - name: Download Node.js dependencies + uses: actions/download-artifact@v3 + with: + name: node-modules + path: node_modules + + # Download build output from the build job artifact + - name: Download build output + uses: actions/download-artifact@v3 + with: + name: build-output + path: build + + # Test the specific package in the matrix - name: Test run: npx turbo run test --filter=${{ matrix.package }} From d7de7aab588abca2ee5bc993866daeefac9c3ffe Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Fri, 4 Oct 2024 13:23:45 -0500 Subject: [PATCH 25/26] attempt two --- .github/workflows/test.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e145f6a28..8ea3dfc9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,7 @@ jobs: echo "packages=$PACKAGES" >> $GITHUB_OUTPUT echo "Found packages: $PACKAGES" - # New build job that runs once and produces build output and dependencies + # Build job that runs once and produces build output and dependencies build: runs-on: ubuntu-latest outputs: @@ -69,29 +69,28 @@ jobs: - name: Install dependencies run: npm ci - # Cache build output + # Cache build output (build outputs located in ./**/**/dist for each package) - name: Cache build output uses: actions/cache@v3 with: path: | - build - dist + ./**/**/dist key: ${{ runner.os }}-build-${{ hashFiles('**/package.json', '**/tsconfig.json') }} restore-keys: | ${{ runner.os }}-build- - - name: Build + - name: Build all packages run: npx turbo run build - # Upload build and node_modules as artifacts to be shared with test jobs + # Upload all build outputs (from ./**/**/dist for each package) as an artifact to be shared with test jobs - name: Upload build artifact uses: actions/upload-artifact@v3 with: name: build-output path: | - build - dist + ./**/**/dist + # Upload node_modules as an artifact - name: Upload node_modules uses: actions/upload-artifact@v3 with: @@ -118,14 +117,14 @@ jobs: name: node-modules path: node_modules - # Download build output from the build job artifact + # Download the relevant package's build output - name: Download build output uses: actions/download-artifact@v3 with: name: build-output - path: build + path: ./ - # Test the specific package in the matrix + # Run tests for the specific package in the matrix - name: Test run: npx turbo run test --filter=${{ matrix.package }} From 52d9d7d2042123ccef7a4734cefa81d27ee0a44e Mon Sep 17 00:00:00 2001 From: Carl Brugger Date: Fri, 4 Oct 2024 13:36:40 -0500 Subject: [PATCH 26/26] revert caching --- .github/workflows/test.yml | 79 +++++--------------------------------- 1 file changed, 9 insertions(+), 70 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ea3dfc9c..064fed06c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,27 +39,19 @@ jobs: echo "packages=$PACKAGES" >> $GITHUB_OUTPUT echo "Found packages: $PACKAGES" - # Build job that runs once and produces build output and dependencies - build: + test-packages: + needs: determine-packages + name: Test (${{ matrix.package }}) runs-on: ubuntu-latest - outputs: - cache-key: ${{ steps.cache-deps.outputs.cache-key }} + 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@v4 - # Cache Node.js dependencies - - name: Cache Node.js dependencies - id: cache-deps - uses: actions/cache@v3 - with: - path: | - node_modules - **/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Setup Node.js environment uses: actions/setup-node@v4 with: @@ -69,62 +61,9 @@ jobs: - name: Install dependencies run: npm ci - # Cache build output (build outputs located in ./**/**/dist for each package) - - name: Cache build output - uses: actions/cache@v3 - with: - path: | - ./**/**/dist - key: ${{ runner.os }}-build-${{ hashFiles('**/package.json', '**/tsconfig.json') }} - restore-keys: | - ${{ runner.os }}-build- - - - name: Build all packages + - name: Build run: npx turbo run build - # Upload all build outputs (from ./**/**/dist for each package) as an artifact to be shared with test jobs - - name: Upload build artifact - uses: actions/upload-artifact@v3 - with: - name: build-output - path: | - ./**/**/dist - - # Upload node_modules as an artifact - - name: Upload node_modules - uses: actions/upload-artifact@v3 - with: - name: node-modules - path: node_modules - - test-packages: - needs: [determine-packages, build] - name: Test (${{ 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@v4 - - # Download node_modules from the build job artifact - - name: Download Node.js dependencies - uses: actions/download-artifact@v3 - with: - name: node-modules - path: node_modules - - # Download the relevant package's build output - - name: Download build output - uses: actions/download-artifact@v3 - with: - name: build-output - path: ./ - - # Run tests for the specific package in the matrix - name: Test run: npx turbo run test --filter=${{ matrix.package }}