Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jeysal committed Apr 4, 2019
1 parent a6206c5 commit 3dd49d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion e2e/__tests__/workerForceExit.test.ts
Expand Up @@ -19,13 +19,13 @@ import runJest from '../runJest';
const DIR = resolve(tmpdir(), 'worker-force-exit');

beforeEach(() => cleanup(DIR));
afterEach(() => cleanup(DIR));
const testFiles = {
...generateTestFilesToForceUsingWorkers(),
'package.json': `{
"testEnvironment": "node"
}`,
};
afterEach(() => cleanup(DIR));

const verifyNumPassed = stderr => {
const numberOfTestsPassed = (stderr.match(/\bPASS\b/g) || []).length;
Expand Down
6 changes: 3 additions & 3 deletions packages/jest-worker/src/__tests__/index.test.js
Expand Up @@ -133,18 +133,18 @@ it('does not let make calls after the farm is ended', () => {
);
});

it('does not let end the farm after it is ended', () => {
it('does not let end the farm after it is ended', async () => {
const farm = new Farm('/tmp/baz.js', {
exposedMethods: ['foo', 'bar'],
numWorkers: 4,
});

farm.end();
expect(farm._workerPool.end).toHaveBeenCalledTimes(1);
expect(farm.end()).rejects.toThrow(
await expect(farm.end()).rejects.toThrow(
'Farm is ended, no more calls can be done to it',
);
expect(farm.end()).rejects.toThrow(
await expect(farm.end()).rejects.toThrow(
'Farm is ended, no more calls can be done to it',
);
expect(farm._workerPool.end).toHaveBeenCalledTimes(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-worker/src/index.ts
Expand Up @@ -143,6 +143,6 @@ export default class JestWorker {
}
this._ending = true;

return await this._workerPool.end();
return this._workerPool.end();
}
}

0 comments on commit 3dd49d3

Please sign in to comment.