Skip to content

Commit

Permalink
chore(lambda): bump @typescript-eslint/eslint-plugin from 7.18.0 to 8…
Browse files Browse the repository at this point in the history
….8.1 in /lambdas (#4168)

Bumps
[@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)
from 7.18.0 to 8.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases"><code>@​typescript-eslint/eslint-plugin</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v8.8.1</h2>
<h2>8.8.1 (2024-10-07)</h2>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> stop warning on <a
href="https://github.com/ts-nocheck"><code>@​ts-nocheck</code></a>
comments which aren't at the beginning of the file (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10046">#10046</a>)</li>
<li><strong>typescript-estree:</strong> fix crash when running from a
<code>node --eval</code> script (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10098">#10098</a>)</li>
<li><strong>typescript-estree:</strong> ensure mjs/mts files are always
be parsed as ESM (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10011">#10011</a>)</li>
</ul>
<h3>❤️  Thank You</h3>
<ul>
<li>Brad Zacher <a
href="https://github.com/bradzacher"><code>@​bradzacher</code></a></li>
<li>Ronen Amiel</li>
<li>WhitePiano <a
href="https://github.com/goldentrash"><code>@​goldentrash</code></a></li>
</ul>
<p>You can read about our <a
href="https://main--typescript-eslint.netlify.app/users/versioning">versioning
strategy</a> and <a
href="https://main--typescript-eslint.netlify.app/users/releases">releases</a>
on our website.</p>
<h2>v8.8.0</h2>
<h2>8.8.0 (2024-09-30)</h2>
<h3>🚀 Features</h3>
<ul>
<li><strong>eslint-plugin:</strong> [no-unnecessary-condition] add
checkTypePredicates (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10009">#10009</a>)</li>
<li><strong>eslint-plugin:</strong> [await-thenable] check for-await
loop iteree (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10008">#10008</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li>remove <code>export type *</code> in d.ts to support TS&lt;5.0 (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10070">#10070</a>)</li>
<li><strong>eslint-plugin:</strong> [no-unnecessary-template-expression]
should underline template syntax with squiggly lines (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10044">#10044</a>)</li>
<li><strong>eslint-plugin:</strong> [no-deprecated] max callstack
exceeded when class implements itself (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10040">#10040</a>)</li>
<li><strong>eslint-plugin:</strong> [no-misused-promises] check
contextual type (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10042">#10042</a>)</li>
<li><strong>eslint-plugin:</strong> [prefer-literal-enum-member] allow
nested bitwise operations (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10037">#10037</a>)</li>
<li><strong>type-utils:</strong> check for type parameters on
<code>isBuiltinSymbolLikeRecurser()</code> (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10026">#10026</a>)</li>
<li><strong>utils:</strong> update missing type information message (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10043">#10043</a>)</li>
</ul>
<h3>❤️  Thank You</h3>
<ul>
<li>auvred <a
href="https://github.com/auvred"><code>@​auvred</code></a></li>
<li>Josh Goldberg ✨</li>
<li>Kirk Waiblinger <a
href="https://github.com/kirkwaiblinger"><code>@​kirkwaiblinger</code></a></li>
<li>Ronen Amiel</li>
<li>Tarun Chauhan <a
href="https://github.com/tarunrajput"><code>@​tarunrajput</code></a></li>
<li>YeonJuan <a
href="https://github.com/yeonjuan"><code>@​yeonjuan</code></a></li>
</ul>
<p>You can read about our <a
href="https://main--typescript-eslint.netlify.app/users/versioning">versioning
strategy</a> and <a
href="https://main--typescript-eslint.netlify.app/users/releases">releases</a>
on our website.</p>
<h2>v8.7.0</h2>
<h2>8.7.0 (2024-09-23)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md"><code>@​typescript-eslint/eslint-plugin</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.8.1 (2024-10-07)</h2>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> stop warning on <a
href="https://github.com/ts-nocheck"><code>@​ts-nocheck</code></a>
comments which aren't at the beginning of the file</li>
</ul>
<h3>❤️  Thank You</h3>
<ul>
<li>Brad Zacher</li>
<li>Ronen Amiel</li>
<li>WhitePiano</li>
</ul>
<p>You can read about our <a
href="https://main--typescript-eslint.netlify.app/users/versioning">versioning
strategy</a> and <a
href="https://main--typescript-eslint.netlify.app/users/releases">releases</a>
on our website.</p>
<h2>8.8.0 (2024-09-30)</h2>
<h3>🚀 Features</h3>
<ul>
<li>
<p><strong>eslint-plugin:</strong> [no-unnecessary-condition] add
checkTypePredicates</p>
</li>
<li>
<p><strong>eslint-plugin:</strong> [return-await] check for-await loop
iteree</p>
</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li>
<p>remove <code>export type *</code> in d.ts to support TS&lt;5.0</p>
</li>
<li>
<p><strong>eslint-plugin:</strong> [no-unnecessary-template-expression]
should underline template syntax with squiggly lines</p>
</li>
<li>
<p><strong>type-utils:</strong> check for type parameters on
<code>isBuiltinSymbolLikeRecurser()</code></p>
</li>
<li>
<p><strong>eslint-plugin:</strong> [no-deprecated] max callstack
exceeded when class implements itself</p>
</li>
<li>
<p><strong>eslint-plugin:</strong> [no-misused-promises] check
contextual type</p>
</li>
<li>
<p><strong>eslint-plugin:</strong> [prefer-literal-enum-member] allow
nested bitwise operations</p>
</li>
</ul>
<h3>❤️  Thank You</h3>
<ul>
<li>auvred</li>
<li>Josh Goldberg ✨</li>
<li>Kirk Waiblinger</li>
<li>Ronen Amiel</li>
<li>Tarun Chauhan</li>
<li>YeonJuan</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/f898248934fe8bba8a1a961373b86d508a9fca9c"><code>f898248</code></a>
chore(release): publish 8.8.1</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/2d6ee87a30f1272845d5483da2f28dd742ca9843"><code>2d6ee87</code></a>
fix(eslint-plugin): stop warning on <a
href="https://github.com/ts-nocheck"><code>@​ts-nocheck</code></a>
comments which aren't at the ...</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/2055cfbbdef5d9b7ee4ed7180f0af93eed245235"><code>2055cfb</code></a>
chore(release): publish 8.8.0</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/b121bd9557986799b6ccd5c4f9a6722c34329665"><code>b121bd9</code></a>
feat(eslint-plugin): [return-await] check for-await loop iteree (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/10008">#10008</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/9028d9d3d751a9e68f6f4376d2a99ce9bb64def9"><code>9028d9d</code></a>
docs: [no-unsafe-enum-comparison] clarify motivation and applicability
(<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/10029">#10029</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/977e0a1c41b8715d107898072d599fbc85c13b79"><code>977e0a1</code></a>
fix(eslint-plugin): [prefer-literal-enum-member] allow nested bitwise
operati...</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/6ce66b59ec3b4ab01d3a6505fb9d08955ef12008"><code>6ce66b5</code></a>
fix: remove <code>export type *</code> in d.ts to support TS&lt;5.0 (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/10070">#10070</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/a916ff27c151f10db9fdbb259828ed50796dfe61"><code>a916ff2</code></a>
feat(eslint-plugin): [no-unnecessary-condition] add checkTypePredicates
(<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/10009">#10009</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/b36d524d37c58cf8102e24dae021b57b37687159"><code>b36d524</code></a>
fix(eslint-plugin): [no-misused-promises] check contextual type (<a
href="https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin/issues/10042">#10042</a>)</li>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/7a216fe7b859fdd2498fcfa84ac8deb8c41530e8"><code>7a216fe</code></a>
fix(eslint-plugin): [no-deprecated] max callstack exceeded when class
impleme...</li>
<li>Additional commits viewable in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.8.1/packages/eslint-plugin">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@typescript-eslint/eslint-plugin&package-manager=npm_and_yarn&previous-version=7.18.0&new-version=8.8.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stuart Pearson <[email protected]>
Co-authored-by: Niek Palm <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2024
1 parent 44f5d6d commit 2302e48
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 134 deletions.
2 changes: 1 addition & 1 deletion lambdas/functions/ami-housekeeper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/aws-lambda": "^8.10.145",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "^0.38.1",
"aws-sdk-client-mock": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/ami-housekeeper/src/lambda.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('Housekeeper ami', () => {
resolve();
});
});
expect(await handler(undefined, context)).resolves;
await expect(handler(undefined, context)).resolves.not.toThrow();
});

it('should not thow only log in error in case of an exception.', async () => {
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/control-plane/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/aws-lambda": "^8.10.145",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "^0.38.1",
"aws-sdk-client-mock": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/control-plane/src/aws/runners.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ describe('create runner with errors', () => {
it('test now error is thrown if an instance is created', async () => {
createFleetMockWithErrors(['NonMappedError'], ['i-123']);

expect(await createRunner(createRunnerConfig(defaultRunnerConfig))).resolves;
await expect(createRunner(createRunnerConfig(defaultRunnerConfig))).resolves.toEqual(['i-123']);
expect(mockEC2Client).toHaveReceivedCommandWith(
CreateFleetCommand,
expectedCreateFleetRequest(defaultExpectedFleetRequestValues),
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/control-plane/src/github/octokit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Test getOctokit', () => {
mockOctokit.apps.getOrgInstallation.mockRejectedValue(new Error('Error'));
}

expect(await getOctokit('', input.orgLevelRunner, payload)).resolves;
await expect(getOctokit('', input.orgLevelRunner, payload)).resolves.toBeDefined();

if (output.callOrgInstallation) {
expect(mockOctokit.apps.getOrgInstallation).toHaveBeenCalled();
Expand Down
6 changes: 3 additions & 3 deletions lambdas/functions/control-plane/src/lambda.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Test scale up lambda wrapper.', () => {
resolve();
});
});
expect(await scaleUpHandler(sqsEvent, context)).resolves;
await expect(scaleUpHandler(sqsEvent, context)).resolves.not.toThrow();
});

it('Non scale should resolve.', async () => {
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('Test job retry check wrapper', () => {
resolve();
});
});
expect(await jobRetryCheck(sqsEvent, context)).resolves;
await expect(jobRetryCheck(sqsEvent, context)).resolves.not.toThrow();
});

it('Handle with error should resolve and log only a warning.', async () => {
Expand All @@ -216,7 +216,7 @@ describe('Test job retry check wrapper', () => {
const error = new Error('Error handling retry check.');
mock.mockRejectedValue(error);

expect(await jobRetryCheck(sqsEvent, context)).resolves;
await expect(jobRetryCheck(sqsEvent, context)).resolves.not.toThrow();
expect(logSpyWarn).toHaveBeenCalledWith(expect.stringContaining(error.message), expect.anything());
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ describe('Scale down runners', () => {
expect(listEC2Runners).toHaveBeenCalledWith({
environment: ENVIRONMENT,
});
expect(terminateRunner).not;
expect(mockOctokit.apps.getRepoInstallation).not;
expect(mockOctokit.apps.getRepoInstallation).not;
expect(terminateRunner).not.toHaveBeenCalled();
expect(mockOctokit.apps.getRepoInstallation).not.toHaveBeenCalled();
expect(mockOctokit.apps.getRepoInstallation).not.toHaveBeenCalled();
});

it(`Should terminate runner without idle config ${type} runners.`, async () => {
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/gh-agent-syncer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@types/request": "^2.48.12",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "^0.38.1",
"aws-sdk-client-mock": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/gh-agent-syncer/src/syncer/syncer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function getCachedVersion(s3Client: S3Client, cacheObject: CacheObject): P
const objectTagging = await s3Client.send(command);
const versions = objectTagging.TagSet?.filter((t: Tag) => t.Key === versionKey);
return versions?.length === 1 ? versions[0].Value : undefined;
} catch (e) {
} catch {
logger.debug('No tags found');
return undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/termination-watcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/aws-lambda": "^8.10.145",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "^0.38.1",
"aws-sdk-client-mock": "^4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/termination-watcher/src/lambda.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Handle sport termination interruption warning', () => {
resolve();
});
});
expect(await interruptionWarning(event, context)).resolves;
await expect(interruptionWarning(event, context)).resolves.not.toThrow();
});

it('should not throw only log in error in case of an exception.', async () => {
Expand Down
1 change: 1 addition & 0 deletions lambdas/functions/termination-watcher/src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EventBridgeEvent } from 'aws-lambda';

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface SpotInterruptionWarning<SpotTerminationDetail>
extends EventBridgeEvent<'EC2 Spot Instance Interruption Warning', SpotTerminationDetail> {}

Expand Down
2 changes: 1 addition & 1 deletion lambdas/functions/webhook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "0.38.1",
"body-parser": "^1.20.3",
Expand Down
17 changes: 9 additions & 8 deletions lambdas/functions/webhook/src/sqs/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ describe('Test sending message to SQS.', () => {
QueueUrl: queueUrl,
MessageBody: JSON.stringify(no_fifo_message),
};

// Act
const result = await sendActionRequest(no_fifo_message);
const result = sendActionRequest(no_fifo_message);

// Assert
expect(mockSQS.sendMessage).toBeCalledWith(sqsMessage);
expect(result).resolves;
expect(mockSQS.sendMessage).toHaveBeenCalledWith(sqsMessage);
await expect(result).resolves.not.toThrow();
});

it('use a fifo queue', async () => {
Expand All @@ -64,11 +65,11 @@ describe('Test sending message to SQS.', () => {
MessageBody: JSON.stringify(fifo_message),
};
// Act
const result = await sendActionRequest(fifo_message);
const result = sendActionRequest(fifo_message);

// Assert
expect(mockSQS.sendMessage).toBeCalledWith({ ...sqsMessage, MessageGroupId: String(message.id) });
expect(result).resolves;
expect(mockSQS.sendMessage).toHaveBeenCalledWith({ ...sqsMessage, MessageGroupId: String(message.id) });
await expect(result).resolves.not.toThrow();
});
});

Expand All @@ -94,11 +95,11 @@ describe('Test sending message to SQS.', () => {
const config = await Config.load();

// Act
const result = await sendWebhookEventToWorkflowJobQueue(message, config);
const result = sendWebhookEventToWorkflowJobQueue(message, config);

// Assert
expect(mockSQS.sendMessage).toHaveBeenCalledWith(sqsMessage);
expect(result).resolves;
await expect(result).resolves.not.toThrow();
});

it('Does not send webhook events to workflow job event copy queue when job queue is not in environment', async () => {
Expand Down
2 changes: 1 addition & 1 deletion lambdas/libs/aws-powertools-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "0.38.1",
"body-parser": "^1.20.3",
Expand Down
2 changes: 1 addition & 1 deletion lambdas/libs/aws-ssm-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.0",
"@vercel/ncc": "0.38.1",
"body-parser": "^1.20.3",
Expand Down
6 changes: 3 additions & 3 deletions lambdas/libs/aws-ssm-util/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ describe('Test getParameter and putParameter', () => {
},
};

mockSSMClient.on(PutParameterCommand).resolves(output);
mockSSMClient.on(PutParameterCommand).rejects(output);

// Act
expect(putParameter(parameterName, parameterValue, true)).rejects;
await expect(putParameter(parameterName, parameterValue, true)).rejects.toThrow();
});

it('Puts parameters and returns success', async () => {
Expand All @@ -75,7 +75,7 @@ describe('Test getParameter and putParameter', () => {
mockSSMClient.on(PutParameterCommand).resolves(output);

// Act
expect(putParameter(parameterName, parameterValue, true)).resolves;
await expect(putParameter(parameterName, parameterValue, true)).resolves.not.toThrow();
});

it('Puts parameters as String', async () => {
Expand Down
Loading

0 comments on commit 2302e48

Please sign in to comment.