Files
Botexercito/Frontend/angular-internal-chat/node_modules/piscina/test/issue-513.ts
T

20 lines
422 B
TypeScript
Raw Normal View History

2026-03-22 18:07:19 +00:00
import Piscina from '..';
import { test } from 'tap';
import { resolve } from 'path';
test('pool will maintain run and wait time histograms', async ({
equal,
fail
}) => {
const pool = new Piscina({
filename: resolve(__dirname, 'fixtures/vm.js')
});
try {
await pool.run({ payload: 'throw new Error("foo")' });
fail('Expected an error');
} catch (error) {
equal(error.message, 'foo');
}
});