gui/ui/node_modules.bak/piscina/test/issue-513.test.ts
Snider fad16c8c76
Some checks failed
Security Scan / security (push) Failing after 34s
Test / test (push) Failing after 1m44s
chore: sync workspace dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:44:56 +00:00

17 lines
468 B
TypeScript

import assert from 'node:assert';
import { test } from 'node:test';
import { resolve } from 'node:path';
import Piscina from '..';
test('pool will maintain run and wait time histograms', async () => {
const pool = new Piscina({
filename: resolve(__dirname, 'fixtures/vm.js')
});
try {
await pool.run({ payload: 'throw new Error("foo")' });
assert.fail('Expected an error');
} catch (error) {
assert.strictEqual(error.message, 'foo');
}
});