poku 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -221,7 +221,7 @@ To see the detailed documentation, please visit the [**Documentation**](https://
221
221
  - [Avoiding conflicts in environments with multiple platforms installed](https://poku.io/docs/tutorials/cross-platform#recommendations).
222
222
  - [Properly running asynchronous tests on the same file](https://poku.io/docs/examples/promises).
223
223
  - [Migrating from version **1.x** to version **2.x**](https://github.com/wellwelwel/poku/issues/533).
224
- - [Using **Poku** with **Deno** and approaches to **JSR**](https://github.com/wellwelwel/poku/discussions/565).
224
+ - [Using **Poku** without installing on **Deno** and alternatives to **JSR**](https://github.com/wellwelwel/poku/discussions/565).
225
225
 
226
226
  ---
227
227
 
@@ -243,9 +243,9 @@ To see the detailed documentation, please visit the [**Documentation**](https://
243
243
 
244
244
  [![Install Size](https://packagephobia.com/badge?p=poku)](https://pkg-size.dev/poku)
245
245
 
246
- - [~**300x** lighter than **Vitest**](https://pkg-size.dev/vitest)
247
- - [~**170x** lighter than **Jest**](https://pkg-size.dev/jest)
248
- - [~**40x** lighter than **Mocha** + **Chai**](https://pkg-size.dev/mocha%20chai)
246
+ - [~**230x** lighter than **Vitest**](https://pkg-size.dev/vitest)
247
+ - [~**130x** lighter than **Jest**](https://pkg-size.dev/jest)
248
+ - [~**30x** lighter than **Mocha** + **Chai**](https://pkg-size.dev/mocha%20chai)
249
249
 
250
250
  > **Poku** size is highly significant in development to ensure cost-saving **CI** that require servers that charge for storage and usage.
251
251
 
@@ -2,6 +2,5 @@ export declare const indentation: {
2
2
  test: string;
3
3
  stdio: string;
4
4
  hasDescribe: boolean;
5
- hasTest: boolean;
6
- hasIt: boolean;
5
+ hasItOrTest: boolean;
7
6
  };
@@ -5,6 +5,5 @@ exports.indentation = {
5
5
  test: ' ',
6
6
  stdio: ' ',
7
7
  hasDescribe: false,
8
- hasTest: false,
9
- hasIt: false,
8
+ hasItOrTest: false,
10
9
  };
@@ -25,14 +25,12 @@ async function poku(targetPaths, configs) {
25
25
  files_js_1.finalResults.started = new Date();
26
26
  const start = node_process_1.default.hrtime();
27
27
  const prepareDirs = Array.prototype.concat(targetPaths);
28
- /* c8 ignore next */ // TODO: Allow users to pass cwd for monorepo improvements
29
28
  const dirs = prepareDirs.length > 0 ? prepareDirs : ['.'];
30
29
  const showLogs = !(0, output_js_1.isQuiet)(configs);
31
30
  // Sequential
32
31
  if (!(configs === null || configs === void 0 ? void 0 : configs.parallel)) {
33
32
  for (const dir of dirs) {
34
33
  const result = await (0, run_tests_js_1.runTests)(dir, configs);
35
- /* c8 ignore next 6 */
36
34
  if (!result) {
37
35
  code = 1;
38
36
  if (configs === null || configs === void 0 ? void 0 : configs.failFast) {
@@ -52,24 +50,20 @@ async function poku(targetPaths, configs) {
52
50
  // Parallel
53
51
  if (showLogs) {
54
52
  write_js_1.Write.hr();
55
- /* c8 ignore next */ // ?
56
53
  write_js_1.Write.log(`${(0, format_js_1.format)('Running the Test Suite in Parallel').bold()}\n`);
57
54
  }
58
55
  try {
59
56
  const promises = dirs.map(async (dir) => {
60
57
  const result = await (0, run_tests_js_1.runTestsParallel)(dir, configs);
61
- /* c8 ignore next 3 */
62
58
  if (!result && (configs === null || configs === void 0 ? void 0 : configs.failFast)) {
63
59
  throw new Error('quiet');
64
60
  }
65
61
  return result;
66
62
  });
67
63
  const concurrency = await Promise.all(promises);
68
- /* c8 ignore next 3 */
69
64
  if (concurrency.some((result) => !result)) {
70
65
  code = 1;
71
66
  }
72
- /* c8 ignore next */
73
67
  }
74
68
  catch (_a) {
75
69
  }
@@ -84,13 +78,11 @@ async function poku(targetPaths, configs) {
84
78
  .map(([file, time]) => `${indentation_js_1.indentation.test}${(0, format_js_1.format)('✔').success()} ${(0, format_js_1.format)(`${file} ${(0, format_js_1.format)(`› ${time}ms`).success()}`).dim()}`)
85
79
  .join('\n'));
86
80
  }
87
- /* c8 ignore start */
88
81
  if (showLogs && files_js_1.fileResults.fail.size > 0) {
89
82
  write_js_1.Write.log(Array.from(files_js_1.fileResults.fail)
90
83
  .map(([file, time]) => `${indentation_js_1.indentation.test}${(0, format_js_1.format)('✘').fail()} ${(0, format_js_1.format)(`${file} ${(0, format_js_1.format)(`› ${time}ms`).fail()}`).dim()}`)
91
84
  .join('\n'));
92
85
  }
93
- /* c8 ignore stop */
94
86
  if (configs === null || configs === void 0 ? void 0 : configs.noExit) {
95
87
  return code;
96
88
  }
@@ -28,7 +28,6 @@ async function describe(arg1, arg2) {
28
28
  if (title) {
29
29
  indentation_js_1.indentation.hasDescribe = true;
30
30
  const { background, icon } = options || {};
31
- /* c8 ignore next */
32
31
  const message = `${cb ? (0, format_js_1.format)('◌').dim() : icon || '☰'} ${cb ? (0, format_js_1.format)(isPoku ? `${title} › ${(0, format_js_1.format)(`${FILE}`).italic().gray()}` : title).dim() : (0, format_js_1.format)(title).bold() || ''}`;
33
32
  const noBackground = !background;
34
33
  if (noBackground) {
@@ -23,7 +23,7 @@ const beforeEach = (callback, options) => {
23
23
  (options === null || options === void 0 ? void 0 : options.immediate) && callback();
24
24
  each_js_1.each.before.cb = () => {
25
25
  if (each_js_1.each.before.status) {
26
- callback();
26
+ return callback();
27
27
  }
28
28
  };
29
29
  const pause = () => {
@@ -59,7 +59,7 @@ exports.beforeEach = beforeEach;
59
59
  const afterEach = (callback) => {
60
60
  each_js_1.each.after.cb = () => {
61
61
  if (each_js_1.each.after.status) {
62
- callback();
62
+ return callback();
63
63
  }
64
64
  };
65
65
  const pause = () => {
@@ -9,49 +9,56 @@ const format_js_1 = require("../../services/format.js");
9
9
  const write_js_1 = require("../../services/write.js");
10
10
  /* c8 ignore next */ // ?
11
11
  async function it(...args) {
12
- let message;
13
- let cb;
14
- const isPoku = typeof (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE) === 'string' && (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE.length) > 0;
15
- const FILE = node_process_1.env.FILE;
16
- if (typeof each_js_1.each.before.cb === 'function') {
17
- const beforeResult = each_js_1.each.before.cb();
18
- /* c8 ignore next 3 */
19
- if (beforeResult instanceof Promise) {
20
- await beforeResult;
12
+ try {
13
+ let message;
14
+ let cb;
15
+ const isPoku = typeof (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE) === 'string' && (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE.length) > 0;
16
+ const FILE = node_process_1.env.FILE;
17
+ if (typeof args[0] === 'string') {
18
+ message = args[0];
19
+ cb = args[1];
21
20
  }
22
- }
23
- if (typeof args[0] === 'string') {
24
- message = args[0];
25
- cb = args[1];
26
- }
27
- else {
28
- cb = args[0];
29
- }
30
- /* c8 ignore start */
31
- if (message) {
32
- indentation_js_1.indentation.hasIt = true;
33
- write_js_1.Write.log(isPoku && !indentation_js_1.indentation.hasDescribe
34
- ? `${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◌ ${message} › ${(0, format_js_1.format)(`${FILE}`).italic().gray()}`).dim()}`
35
- : `${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◌ ${message}`).dim()}`);
36
- }
37
- /* c8 ignore stop */
38
- const start = (0, node_process_1.hrtime)();
39
- const resultCb = cb();
40
- /* c8 ignore next 3 */
41
- if (resultCb instanceof Promise) {
42
- await resultCb;
43
- }
44
- const end = (0, node_process_1.hrtime)(start);
45
- if (typeof each_js_1.each.after.cb === 'function') {
46
- const afterResult = each_js_1.each.after.cb();
47
- /* c8 ignore next 3 */
48
- if (afterResult instanceof Promise) {
49
- await afterResult;
21
+ else {
22
+ cb = args[0];
23
+ }
24
+ if (message) {
25
+ indentation_js_1.indentation.hasItOrTest = true;
26
+ write_js_1.Write.log(isPoku && !indentation_js_1.indentation.hasDescribe
27
+ ? `${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◌ ${message} › ${(0, format_js_1.format)(`${FILE}`).italic().gray()}`).dim()}`
28
+ : `${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◌ ${message}`).dim()}`);
29
+ }
30
+ if (typeof each_js_1.each.before.cb === 'function') {
31
+ const beforeResult = each_js_1.each.before.cb();
32
+ if (beforeResult instanceof Promise) {
33
+ await beforeResult;
34
+ }
35
+ }
36
+ const start = (0, node_process_1.hrtime)();
37
+ const resultCb = cb();
38
+ if (resultCb instanceof Promise) {
39
+ await resultCb;
40
+ }
41
+ const end = (0, node_process_1.hrtime)(start);
42
+ if (typeof each_js_1.each.after.cb === 'function') {
43
+ const afterResult = each_js_1.each.after.cb();
44
+ if (afterResult instanceof Promise) {
45
+ await afterResult;
46
+ }
47
+ }
48
+ if (message) {
49
+ const total = (end[0] * 1e3 + end[1] / 1e6).toFixed(6);
50
+ indentation_js_1.indentation.hasItOrTest = false;
51
+ write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`● ${message}`).success().bold()} ${(0, format_js_1.format)(`› ${total}ms`).success().dim()}`);
50
52
  }
51
53
  }
52
- if (message) {
53
- const total = (end[0] * 1e3 + end[1] / 1e6).toFixed(6);
54
- indentation_js_1.indentation.hasIt = false;
55
- write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`● ${message}`).success().bold()} ${(0, format_js_1.format)(`› ${total}ms`).success().dim()}`);
54
+ catch (error) {
55
+ indentation_js_1.indentation.hasItOrTest = false;
56
+ if (typeof each_js_1.each.after.cb === 'function') {
57
+ const afterResult = each_js_1.each.after.cb();
58
+ if (afterResult instanceof Promise) {
59
+ await afterResult;
60
+ }
61
+ }
62
+ throw error;
56
63
  }
57
64
  }
@@ -1,4 +1,2 @@
1
- export declare function test(message: string, cb: () => Promise<unknown>): Promise<void>;
2
- export declare function test(message: string, cb: () => unknown): void;
3
- export declare function test(cb: () => Promise<unknown>): Promise<void>;
4
- export declare function test(cb: () => unknown): void;
1
+ import { it } from './it.js';
2
+ export declare const test: typeof it;
@@ -1,57 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.test = test;
3
+ exports.test = void 0;
4
4
  /* c8 ignore next */ // ?
5
- const node_process_1 = require("process");
6
- const each_js_1 = require("../../configs/each.js");
7
- const indentation_js_1 = require("../../configs/indentation.js");
8
- const format_js_1 = require("../../services/format.js");
9
- const write_js_1 = require("../../services/write.js");
5
+ const it_js_1 = require("./it.js");
10
6
  /* c8 ignore next */ // ?
11
- async function test(...args) {
12
- let message;
13
- let cb;
14
- const isPoku = typeof (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE) === 'string' && (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE.length) > 0;
15
- const FILE = node_process_1.env.FILE;
16
- if (typeof each_js_1.each.before.cb === 'function') {
17
- const beforeResult = each_js_1.each.before.cb();
18
- /* c8 ignore next 3 */
19
- if (beforeResult instanceof Promise) {
20
- await beforeResult;
21
- }
22
- }
23
- if (typeof args[0] === 'string') {
24
- message = args[0];
25
- cb = args[1];
26
- }
27
- else {
28
- cb = args[0];
29
- }
30
- /* c8 ignore start */
31
- if (message) {
32
- indentation_js_1.indentation.hasTest = true;
33
- write_js_1.Write.log(isPoku
34
- ? (0, format_js_1.format)(`◌ ${message} › ${(0, format_js_1.format)(`${FILE}`).italic().gray()}`).dim()
35
- : (0, format_js_1.format)(`◌ ${message}`).dim());
36
- }
37
- /* c8 ignore stop */
38
- const start = (0, node_process_1.hrtime)();
39
- const resultCb = cb();
40
- /* c8 ignore next 3 */
41
- if (resultCb instanceof Promise) {
42
- await resultCb;
43
- }
44
- const end = (0, node_process_1.hrtime)(start);
45
- if (typeof each_js_1.each.after.cb === 'function') {
46
- const afterResult = each_js_1.each.after.cb();
47
- /* c8 ignore next 3 */
48
- if (afterResult instanceof Promise) {
49
- await afterResult;
50
- }
51
- }
52
- if (message) {
53
- const total = (end[0] * 1e3 + end[1] / 1e6).toFixed(6);
54
- indentation_js_1.indentation.hasTest = false;
55
- write_js_1.Write.log(`${(0, format_js_1.format)(`● ${message}`).success().bold()} ${(0, format_js_1.format)(`› ${total}ms`).success().dim()}`);
56
- }
57
- }
7
+ exports.test = it_js_1.it;
@@ -20,7 +20,7 @@ const parseResultType = (type) => {
20
20
  if (value instanceof Set) {
21
21
  return Array.from(value).map(recurse);
22
22
  }
23
- /* c8 ignore start */ // Vary versions
23
+ /* c8 ignore start */
24
24
  if (value instanceof Map) {
25
25
  return recurse(!get_runtime_js_1.nodeVersion || get_runtime_js_1.nodeVersion >= 12
26
26
  ? Object.fromEntries(value)
@@ -1,27 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.getConfigs = void 0;
27
4
  const node_process_1 = require("process");
@@ -43,8 +20,7 @@ const getConfigs = async (customPath) => {
43
20
  const filePath = (0, node_path_1.join)(processCWD, file);
44
21
  try {
45
22
  if (filePath.endsWith('.js') || filePath.endsWith('.cjs')) {
46
- /* c8 ignore next */ // ?
47
- return (await Promise.resolve(`${(0, node_path_1.normalize)(filePath)}`).then(s => __importStar(require(s))));
23
+ return require(`file://${(0, node_path_1.normalize)(filePath)}`);
48
24
  }
49
25
  const configsFile = await (0, fs_js_1.readFile)(filePath, 'utf-8');
50
26
  return jsonc_js_1.JSONC.parse(configsFile);
@@ -9,7 +9,6 @@ const regex = {
9
9
  };
10
10
  const isQuiet = (configs) => typeof (configs === null || configs === void 0 ? void 0 : configs.quiet) === 'boolean' && Boolean(configs === null || configs === void 0 ? void 0 : configs.quiet);
11
11
  exports.isQuiet = isQuiet;
12
- /* c8 ignore next */
13
12
  const isDebug = (configs) => Boolean(configs === null || configs === void 0 ? void 0 : configs.debug);
14
13
  exports.isDebug = isDebug;
15
14
  /* c8 ignore next */ // ?
@@ -19,24 +19,19 @@ const processAssert = async (cb, options) => {
19
19
  const isPoku = typeof (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE) === 'string' && (node_process_1.env === null || node_process_1.env === void 0 ? void 0 : node_process_1.env.FILE.length) > 0;
20
20
  const FILE = node_process_1.env.FILE;
21
21
  let preIdentation = '';
22
- if (indentation_js_1.indentation.hasDescribe || indentation_js_1.indentation.hasTest) {
22
+ if (indentation_js_1.indentation.hasDescribe) {
23
23
  preIdentation += ' ';
24
24
  }
25
- if (indentation_js_1.indentation.hasIt) {
25
+ if (indentation_js_1.indentation.hasItOrTest) {
26
26
  preIdentation += ' ';
27
27
  }
28
28
  try {
29
29
  const cbResult = cb();
30
- /* c8 ignore next 3 */
31
30
  if (cbResult instanceof Promise) {
32
31
  await cbResult;
33
32
  }
34
33
  if (typeof options.message === 'string') {
35
- const message = isPoku &&
36
- !indentation_js_1.indentation.hasDescribe &&
37
- !indentation_js_1.indentation.hasIt &&
38
- /* c8 ignore next 2 */
39
- !indentation_js_1.indentation.hasTest
34
+ const message = isPoku && !indentation_js_1.indentation.hasDescribe && !indentation_js_1.indentation.hasItOrTest
40
35
  ? `${preIdentation}${(0, format_js_1.format)(`${(0, format_js_1.format)(`✔ ${options.message}`).bold()} ${(0, format_js_1.format)(`› ${FILE}`).success().dim()}`).success()}`
41
36
  : `${preIdentation}${(0, format_js_1.format)(`✔ ${options.message}`).success().bold()}`;
42
37
  write_js_1.Write.log(message);
@@ -89,7 +84,6 @@ const processAssert = async (cb, options) => {
89
84
  // Non-assertion errors
90
85
  throw error;
91
86
  }
92
- /* c8 ignore stop */
93
87
  };
94
88
  exports.processAssert = processAssert;
95
89
  /* c8 ignore next */ // ?
@@ -5,7 +5,6 @@ const format_js_1 = require("./format.js");
5
5
  const write_js_1 = require("../services/write.js");
6
6
  const output_js_1 = require("../parsers/output.js");
7
7
  const eachCore = async (type, fileRelative, configs) => {
8
- /* c8 ignore next 3 */
9
8
  if (typeof (configs === null || configs === void 0 ? void 0 : configs[type]) !== 'function') {
10
9
  return true;
11
10
  }
@@ -1,4 +1,6 @@
1
1
  export declare const normalizePath: (filePath: string) => string;
2
2
  export declare const getDeepImports: (content: string) => Set<string>;
3
3
  export declare const findMatchingFiles: (srcFilesWithoutExt: Set<string>, srcFilesWithExt: Set<string>) => Set<string>;
4
+ export declare const processDeepImports: (srcFile: string, testFile: string, intersectedSrcFiles: Set<string>) => Promise<void>;
5
+ export declare const createImportMap: (allTestFiles: Set<string>, allSrcFiles: Set<string>) => Promise<void>;
4
6
  export declare const mapTests: (srcDir: string, testPaths: string[], testFilter?: RegExp, exclude?: RegExp | RegExp[]) => Promise<Map<string, Set<string>>>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapTests = exports.findMatchingFiles = exports.getDeepImports = exports.normalizePath = void 0;
3
+ exports.mapTests = exports.createImportMap = exports.processDeepImports = exports.findMatchingFiles = exports.getDeepImports = exports.normalizePath = void 0;
4
4
  /* c8 ignore next */ // ?
5
5
  const node_path_1 = require("path");
6
6
  const fs_js_1 = require("../polyfills/fs.js");
@@ -63,13 +63,11 @@ const collectTestFiles = async (testPaths, testFilter, exclude) => {
63
63
  if (stat.isFile() && regex.extFilter.test(testPath)) {
64
64
  return [testPath];
65
65
  }
66
- /* c8 ignore next */
67
66
  return [];
68
67
  });
69
68
  const nestedTestFiles = await Promise.all(listFilesPromises);
70
69
  return new Set(nestedTestFiles.flat());
71
70
  };
72
- /* c8 ignore start */
73
71
  const processDeepImports = async (srcFile, testFile, intersectedSrcFiles) => {
74
72
  if (processedFiles.has(srcFile)) {
75
73
  return;
@@ -83,11 +81,10 @@ const processDeepImports = async (srcFile, testFile, intersectedSrcFiles) => {
83
81
  importMap.set(deepImport, new Set());
84
82
  }
85
83
  importMap.get(deepImport).add((0, exports.normalizePath)(testFile));
86
- await processDeepImports(deepImport, testFile, intersectedSrcFiles);
84
+ await (0, exports.processDeepImports)(deepImport, testFile, intersectedSrcFiles);
87
85
  }
88
86
  };
89
- /* c8 ignore stop */
90
- /* c8 ignore start */
87
+ exports.processDeepImports = processDeepImports;
91
88
  const createImportMap = async (allTestFiles, allSrcFiles) => {
92
89
  const intersectedSrcFiles = new Set(Array.from(allSrcFiles).filter((srcFile) => !allTestFiles.has(srcFile)));
93
90
  await Promise.all(Array.from(allTestFiles).map(async (testFile) => {
@@ -102,12 +99,12 @@ const createImportMap = async (allTestFiles, allSrcFiles) => {
102
99
  importMap.set(normalizedSrcFile, new Set());
103
100
  }
104
101
  (_a = importMap.get(normalizedSrcFile)) === null || _a === void 0 ? void 0 : _a.add((0, exports.normalizePath)(testFile));
105
- await processDeepImports(srcFile, testFile, intersectedSrcFiles);
102
+ await (0, exports.processDeepImports)(srcFile, testFile, intersectedSrcFiles);
106
103
  }
107
104
  }
108
105
  }));
109
106
  };
110
- /* c8 ignore stop */
107
+ exports.createImportMap = createImportMap;
111
108
  /* c8 ignore next */ // ?
112
109
  const mapTests = async (srcDir, testPaths, testFilter, exclude) => {
113
110
  const [allTestFiles, allSrcFiles] = await Promise.all([
@@ -117,7 +114,7 @@ const mapTests = async (srcDir, testPaths, testFilter, exclude) => {
117
114
  exclude,
118
115
  }),
119
116
  ]);
120
- await createImportMap(allTestFiles, new Set(allSrcFiles));
117
+ await (0, exports.createImportMap)(allTestFiles, new Set(allSrcFiles));
121
118
  return importMap;
122
119
  };
123
120
  exports.mapTests = mapTests;
@@ -39,7 +39,6 @@ const runTestFile = async (filePath, configs) => {
39
39
  }
40
40
  const start = (0, node_process_1.hrtime)();
41
41
  let end;
42
- /* c8 ignore next 3 */
43
42
  if (!(await (0, each_js_1.beforeEach)(fileRelative, configs))) {
44
43
  return false;
45
44
  }
@@ -66,7 +65,6 @@ const runTestFile = async (filePath, configs) => {
66
65
  });
67
66
  mappedOutputs && write_js_1.Write.log(mappedOutputs.join('\n'));
68
67
  }
69
- /* c8 ignore next 4 */
70
68
  if (!(await (0, each_js_1.afterEach)(fileRelative, configs))) {
71
69
  resolve(false);
72
70
  return;
@@ -84,12 +84,10 @@ const runTestsParallel = async (dir, configs) => {
84
84
  try {
85
85
  for (const fileGroup of filesByConcurrency) {
86
86
  const promises = fileGroup.map(async (filePath) => {
87
- /* c8 ignore next 3 */
88
87
  if ((configs === null || configs === void 0 ? void 0 : configs.failFast) && poku_js_1.results.fail > 0) {
89
88
  return;
90
89
  }
91
90
  const testPassed = await (0, run_test_file_js_1.runTestFile)(filePath, configs);
92
- /* c8 ignore start */
93
91
  if (!testPassed) {
94
92
  ++poku_js_1.results.fail;
95
93
  if (configs === null || configs === void 0 ? void 0 : configs.failFast) {
@@ -97,7 +95,6 @@ const runTestsParallel = async (dir, configs) => {
97
95
  }
98
96
  return false;
99
97
  }
100
- /* c8 ignore false */
101
98
  ++poku_js_1.results.success;
102
99
  return true;
103
100
  });
@@ -14,7 +14,6 @@ class Watcher {
14
14
  this.callback = callback;
15
15
  }
16
16
  watchFile(filePath) {
17
- /* c8 ignore next 3 */
18
17
  if (this.fileWatchers.has(filePath)) {
19
18
  return;
20
19
  }
@@ -40,7 +39,6 @@ class Watcher {
40
39
  }
41
40
  }
42
41
  async watchDirectory(dir) {
43
- /* c8 ignore next 3 */
44
42
  if (this.dirWatchers.has(dir)) {
45
43
  return;
46
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poku",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.",
5
5
  "main": "./lib/modules/index.js",
6
6
  "license": "MIT",
@@ -60,12 +60,12 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@biomejs/biome": "1.8.3",
63
- "@types/node": "^20.14.11",
63
+ "@types/node": "^20.14.12",
64
64
  "c8": "^10.1.2",
65
65
  "packages-update": "^2.0.0",
66
66
  "prettier": "^3.3.3",
67
67
  "tsx": "4.16.2",
68
- "typescript": "^5.5.3"
68
+ "typescript": "^5.5.4"
69
69
  },
70
70
  "keywords": [
71
71
  "🐷",