Skip to content

Commit

Permalink
fix formatter error
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Nov 30, 2022
1 parent 7126208 commit 63069a5
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions modules/runners/lambdas/runners/src/aws/runners.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ describe('list instances', () => {
});

it('returns a list of instances', async () => {
mockDescribeInstances.promise
.mockReturnValue(mockRunningInstances);
mockDescribeInstances.promise.mockReturnValue(mockRunningInstances);
const resp = await listEC2Runners();
expect(resp.length).toBe(1);
expect(resp).toContainEqual({
Expand All @@ -55,15 +54,13 @@ describe('list instances', () => {
});

it('calls EC2 describe instances', async () => {
mockDescribeInstances.promise
.mockReturnValueOnce(mockRunningInstances);
mockDescribeInstances.promise.mockReturnValueOnce(mockRunningInstances);
await listEC2Runners();
expect(mockEC2.describeInstances).toBeCalled();
});

it('filters instances on repo name', async () => {
mockDescribeInstances.promise
.mockReturnValueOnce(mockRunningInstances);
mockDescribeInstances.promise.mockReturnValueOnce(mockRunningInstances);
await listEC2Runners({ runnerType: 'Repo', runnerOwner: REPO_NAME, environment: undefined });
expect(mockEC2.describeInstances).toBeCalledWith({
Filters: [
Expand All @@ -76,8 +73,7 @@ describe('list instances', () => {
});

it('filters instances on org name', async () => {
mockDescribeInstances.promise
.mockReturnValueOnce(mockRunningInstances);
mockDescribeInstances.promise.mockReturnValueOnce(mockRunningInstances);
await listEC2Runners({ runnerType: 'Org', runnerOwner: ORG_NAME, environment: undefined });
expect(mockEC2.describeInstances).toBeCalledWith({
Filters: [
Expand All @@ -90,8 +86,7 @@ describe('list instances', () => {
});

it('filters instances on environment', async () => {
mockDescribeInstances.promise
.mockReturnValueOnce(mockRunningInstances);
mockDescribeInstances.promise.mockReturnValueOnce(mockRunningInstances);
await listEC2Runners({ environment: ENVIRONMENT });
expect(mockEC2.describeInstances).toBeCalledWith({
Filters: [
Expand Down

0 comments on commit 63069a5

Please sign in to comment.