Primeiro commit do projeto Angular
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { test } from 'node:test';
|
||||
import { resolve } from 'node:path';
|
||||
import Piscina from '..';
|
||||
|
||||
test('can destroy pool while tasks are running', () => {
|
||||
const pool = new Piscina({
|
||||
filename: resolve(__dirname, 'fixtures/eval.js')
|
||||
});
|
||||
setImmediate(() => pool.destroy());
|
||||
|
||||
assert.rejects(pool.run('while(1){}'), /Terminating worker thread/);
|
||||
});
|
||||
Reference in New Issue
Block a user