Skip to content

Commit

Permalink
Fixed indentation in README and added joel-aleios as a contributor
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhamiltondev committed Mar 29, 2022
1 parent fde54c6 commit 475be2c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 44 deletions.
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"]
// "editor.codeActionsOnSave": {
// "source.fixAll.eslint": true
// },
// "eslint.validate": ["javascript"]
}
74 changes: 34 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,24 @@ Note: these assertions also require "await"

Note: these assertions also require "await"

````
```
await expect('USER_POOL_ID').toContainUser('USERNAME');
await expect('USER_POOL_ID').toContainUserWithAttributes({
Username: 'USERNAME',
email: '[email protected]',
// and so on for all cognito user standard attributes
});```
});
```

## Helpers

### General

AWSClient - An AWS client with credentials set up

````

```
getStackResources(stackName) - get information about a stack
getOptions() - get options for making requests to AWS

```

### EventBridge
Expand All @@ -122,20 +121,16 @@ An interface to the deployed EventBridge, allowing events to be injected and int
#### Static

```

EventBridge.build(busName) - create a EventBridge instance to allow events to be injected and intercepted

EventBridge.build(busName) - create a EventBridge instance to allow events to be injected and intercepted
```

#### Instance

```

eventBridge.publishEvent(source, detailType, detail) - publish an event to the bus
eventBridge.getEvents() - get the events that have been sent to the bus
eventBridge.clear() - clear old messages
eventBridge.destroy() - remove infastructure used to track events

eventBridge.publishEvent(source, detailType, detail) - publish an event to the bus
eventBridge.getEvents() - get the events that have been sent to the bus
eventBridge.clear() - clear old messages
eventBridge.destroy() - remove infastructure used to track events
```

### Step Functions
Expand All @@ -145,17 +140,13 @@ An interface to a deployed Step Function, with a function to execute a Step Func
#### Static

```

StepFunctions.build() // create a Step Functions Client for executing existing state machines

```

#### Instance

```

stepFunctions.runExecution(stateMachineName, input) // executes state machine until completion

```

## Running with `jest`
Expand Down Expand Up @@ -186,32 +177,31 @@ let eventBridge;
const s3 = new AWSClient.S3()
describe("Integration Testing Event Bridge", () => {
beforeAll(async () => {
eventBridge = await EventBridge.build("event-bridge")
});
beforeAll(async () => {
eventBridge = await EventBridge.build("event-bridge")
});
afterAll(async () => {
await eventBridge.destroy()
});
afterAll(async () => {
await eventBridge.destroy()
});
it("correctly publishes an event to the event bus when the lambda is invoked", async () => {
const event = {
body: JSON.stringify({
filename: filename,
}),
};
it("correctly publishes an event to the event bus when the lambda is invoked", async () => {
const event = {
body: JSON.stringify({
filename: filename,
}),
};
// Invoke Lambda Function
const params = {
FunctionName: "event-bridge-example-dev-service1",
Payload: JSON.stringify(event),
};
await lambda.invoke(params).promise();

const eventBridgeEvents = await eventBridge.getEvents()
expect(eventBridgeEvents).toHaveEvent();
expect(eventBridgeEvents).toHaveEventWithSource("order.created");

const params = {
FunctionName: "event-bridge-example-dev-service1",
Payload: JSON.stringify(event),
};
await lambda.invoke(params).promise();
const eventBridgeEvents = await eventBridge.getEvents()
expect(eventBridgeEvents).toHaveEvent();
expect(eventBridgeEvents).toHaveEventWithSource("order.created");
});
it("correctly generates a PDF when an order is created", async () => {
Expand Down Expand Up @@ -247,6 +237,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://medium.com/serverless-transformation"><img src="https://avatars1.githubusercontent.com/u/11080984?v=4" width="100px;" alt=""/><br /><sub><b>Ben Ellerby</b></sub></a><br /><a href="https://github.com/BenEllerby/sls-test-tools/commits?author=BenEllerby" title="Code">💻</a> <a href="#content-BenEllerby" title="Content">🖋</a> <a href="https://github.com/BenEllerby/sls-test-tools/commits?author=BenEllerby" title="Documentation">📖</a> <a href="#ideas-BenEllerby" title="Ideas, Planning, & Feedback">🤔</a> <a href="#design-BenEllerby" title="Design">🎨</a> <a href="#talk-BenEllerby" title="Talks">📢</a> <a href="https://github.com/BenEllerby/sls-test-tools/pulls?q=is%3Apr+reviewed-by%3ABenEllerby" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://medium.com/serverless-transformation"><img src="https://avatars.githubusercontent.com/hamilton-s" width="100px;" alt=""/><br /><sub><b>Sarah Hamilton</b></sub></a><br /><a href="https://github.com/BenEllerby/sls-test-tools/commits?author=hamilton-s" title="Code">💻</a> <a href="#content-hamilton-s" title="Content">🖋</a> <a href="https://github.com/BenEllerby/sls-test-tools/commits?author=hamilton-s" title="Documentation">📖</a> <a href="#ideas-hamilton-s" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/agwhi"><img src="https://avatars.githubusercontent.com/agwhi" width="100px;" alt=""/><br /><sub><b>Alex White</b></sub></a><br /><a href="https://github.com/BenEllerby/sls-test-tools/commits?author=agwhi" title="Code">💻</a><a href="https://github.com/BenEllerby/sls-test-tools/commits?author=agwhi" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/joel-aleios"><img src="https://github.com/joel-aleios.png" width="100px;" alt=""/><br /><sub><b>Joel Hamilton</b></sub></a><br /><a href="https://github.com/BenEllerby/sls-test-tools/commits?author=joel-aleios" title="Code">💻</a><a href="https://github.com/BenEllerby/sls-test-tools/commits?author=joel-alieos" title="Documentation">📖</a></td>
</tr>
</table>

Expand All @@ -256,4 +247,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

```
```

0 comments on commit 475be2c

Please sign in to comment.