diff --git a/package.json b/package.json index 0d10b86ddda..b2837b8a98a 100644 --- a/package.json +++ b/package.json @@ -205,8 +205,8 @@ "test:init:eleventy-deps": "npm ci --prefix tests/integration/eleventy-site --no-audit", "test:init:hugo-deps": "npm ci --prefix tests/integration/hugo-site --no-audit", "test:dev:ava": "ava --verbose", - "test:ci:ava:unit": "c8 -r json ava --no-worker-threads tests/unit/**/*.test.js tools/**/*.test.js", - "test:ci:ava:integration": "c8 -r json ava --concurrency 1 --no-worker-threads tests/integration/**/*.test.js", + "test:ci:ava:unit": "c8 -r json ava --no-worker-threads tests/unit/ tools/", + "test:ci:ava:integration": "c8 -r json ava --concurrency 1 --no-worker-threads tests/integration/", "test:affected": "node ./tools/affected-test.mjs", "e2e": "node ./tools/e2e/run.mjs", "docs": "node ./site/scripts/docs.mjs", diff --git a/tests/unit/utils/functions/registry.test.js b/tests/unit/utils/functions/registry.test.js index 6a4f6144233..27c10249c09 100644 --- a/tests/unit/utils/functions/registry.test.js +++ b/tests/unit/utils/functions/registry.test.js @@ -25,5 +25,6 @@ test('should add included_files to watcher', async (t) => { await registry.buildFunctionAndWatchFiles(func) - t.deepEqual(watchDebouncedSpy.args.at(0)[0], ['myfile', 'include/*']) + t.is(watchDebouncedSpy.callCount, 1) + t.deepEqual(watchDebouncedSpy.args[0][0], ['myfile', 'include/*']) })