-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sarah Hamilton
authored and
agwhi
committed
May 14, 2021
1 parent
5f7e1d4
commit 671744d
Showing
7 changed files
with
1,145 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
env: { | ||
node: true, | ||
es6: true, | ||
}, | ||
extends: ["airbnb-base", "prettier"], | ||
globals: { | ||
Atomics: "readonly", | ||
SharedArrayBuffer: "readonly", | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: "module", | ||
}, | ||
plugins: ["prettier"], | ||
rules: { | ||
"prettier/prettier": "error", | ||
quotes: ["error", "double"], | ||
"no-console": "off", | ||
"no-plusplus": "off", | ||
"no-param-reassign": "off", | ||
"no-new": "off", | ||
"import/named": "off", | ||
"import/no-cycle": "off", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
./node_modules | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
{ | ||
"name": "sls-test-tools", | ||
"version": "1.0.0", | ||
"scripts": {}, | ||
"scripts": { | ||
"lint": "eslint ./src", | ||
"fix": "yarn lint --fix" | ||
}, | ||
"dependencies": { | ||
"aws-sdk": "^2.711.0" | ||
"aws-sdk": "^2.711.0", | ||
"import-all.macro": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"import-all.macro": "^3.1.0" | ||
"eslint": "^7.25.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"prettier": "^2.2.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
export default { | ||
toHaveSentEventWithSourceEqualTo(sqsResult, expectedSourceName) { | ||
const receivedSource = JSON.parse(sqsResult.Messages[0].Body).source; | ||
if (receivedSource == expectedSourceName) { | ||
if (receivedSource === expectedSourceName) { | ||
return { | ||
message: () => | ||
`expected sent event to have source ${expectedSourceName}`, | ||
pass: true, | ||
}; | ||
} else { | ||
return { | ||
message: () => | ||
`sent event source "${receivedSource}" does not match expected source "${expectedSourceName}"`, | ||
pass: false, | ||
}; | ||
} | ||
return { | ||
message: () => | ||
`sent event source "${receivedSource}" does not match expected source "${expectedSourceName}"`, | ||
pass: false, | ||
}; | ||
}, | ||
}; |
Oops, something went wrong.