-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[serverless-apollo-contentful] Fix: Refactor Unit tests: healthcheck.test.ts #1035
Merged
Conversation
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
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Outdated
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Outdated
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Outdated
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
starters/serverless-apollo-contentful/src/utils/redis/redis-healthcheck.spec.ts
Show resolved
Hide resolved
ihardz
reviewed
Feb 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost Perfect.
Let me know if any suggested change is not reasonable. I will try to explain
ihardz
approved these changes
Feb 13, 2023
mbicknese
added a commit
that referenced
this pull request
Feb 23, 2023
* [GraphQL-Serverless-Contentful] Init the starter (#524) * Init the project * Added serverless * Rename the starter * move to serverless * remove the hello handler * static analysis testing * removing the .build dir * add .build to .gitignore * .editorconfig * added name and description package.json * added prettier rules * feat: Add Apollo and tests to the kit (#527) * feat: Add testing to the kit * add tsconfig.test * Fix typescript jest * fixed codegen * fix: the test * feat: adds healthcheck (#543) * [GraphQL-Serverless-Contentful] Add Contentful to the project (#529) * feat: Add testing to the kit * add tsconfig.test * Fix typescript jest * fixed codegen * fix: the test * Add contentful to the project * Add the post query mutation * Add the update mutation * added graphql.schema to git ignore * deleted graphql.schema.json * Add the comment model * [graphql-pod-kit1] Create README For Graphql-Serverless Kit (#558) * [GraphQL-Serverless-Contentful] Readme.md * remove the showcase * Update starters/graphql-serverless-contentful/README.md Co-authored-by: Jessica Wilkins <[email protected]> Co-authored-by: Jessica Wilkins <[email protected]> * chore: adding serverless icons and updating config file * updating graphql kit name * locking down dependecies * adding starter kit card to main site * adding hasShowcase boolean to package.json * updating starter kit name in package.json * updating order for starter kit card * updating starter kit name in serverless yaml file * updating starter kits json file * [GraphQL-Serverless-Contentful] Add seeding script to the starter kit (#585) * Add seeding script * fix: replace symbol for comma Co-authored-by: Maarten Bicknese <[email protected]> * chore: update all packages Automatically update all packages to their latest versions by using npm check updates. Closes: #791 Relates to: #792 * chore: update to latest schema * feat: use tabs over spaces * chore: format all files and fix lint * chore: convert all files to use tabs Closes: #794 * fix: restore 2 spaces for yml * fix: missing@graphql-tools/merge (#825) * fix: missing@graphql-tools/merge * chore: pin dep * chore: verify pnpm (#816) * [serverless-apollo-contentful] Change jest.config to be typescript#827 (#829) * [serverless-apollo-contentful] Add missing .env file instructions (#820) * init * add screenshots * docs: update content model docs Co-authored-by: Maarten Bicknese <[email protected]> * [serverless-apollo-contentful] Create Technology model (#861) * feat: jest setup mocks and env * chore: graphql-tools executor * add tests * chore: replicate post tests * fix: typedefs * fix: Post -> Comment * fix: content * update tests * fix: tests for comments * fix: format * Update starters/graphql-serverless-contentful/src/schema/post/post.resolver.test.ts Co-authored-by: Maarten Bicknese <[email protected]> * chore: check if the have been called with * feat: implement technology model * chore: clean up old code * docs: update readme for technology model Closes: #851 * chore: remove left-over code * fix: improve small issues * fix: remove unused line Co-authored-by: Ian Mungai <[email protected]> Co-authored-by: kodejuice <[email protected]> * [serverless-apollo-contentful] Update project structure and technology decisions explanation & Deployment in README (#874) * chore: update readme * fix: remove screenshot * [serverless-apollo-contentful] Add caching to kit (#897) * add redis cache * add redis instructions and docker container * add docker commands and format * move redis client * use official redis image * cache ttl * Update starters/graphql-serverless-contentful/README.md * add redis info to tech section in readme * fix healthcheck - follow spec * Update healthcheck.ts * [serverless-apollo-contentful] Add database migration (#935) * chore: add database migration & add to readme * fix: technology migration * fix: prettier format * [serverless-apollo-contentful] Add queueing to kit (#952) * init * setup handler and generator * iamRoleStatements * complete README * Update starters/graphql-serverless-contentful/package.json * typo * remove params * remove extra port * undefined return type * add env titles * rename port * add hint to job message * remove caret * [serverless-apollo-contentful] Clean up README.md (#958) * [graphql-serverless-contentful] Refractor getEnvironment (#939) * chore: migrations (#964) * [GraphQL-Serverless-Contentful] Init the starter (#524) * feat: Add Apollo and tests to the kit (#527) * feat: adds healthcheck (#543) * [GraphQL-Serverless-Contentful] Add Contentful to the project (#529) * [graphql-pod-kit1] Create README For Graphql-Serverless Kit (#558) * fix: missing@graphql-tools/merge (#825) * chore: verify pnpm (#816) * [serverless-apollo-contentful] Change jest.config to be typescript#827 (#829) * [serverless-apollo-contentful] Add missing .env file instructions (#820) * [serverless-apollo-contentful] Create Technology model (#861) * [serverless-apollo-contentful] Update project structure and technology decisions explanation & Deployment in README (#874) * [serverless-apollo-contentful] Add caching to kit (#897) * [serverless-apollo-contentful] Add database migration (#935) * [serverless-apollo-contentful] Add queueing to kit (#952) * [serverless-apollo-contentful] Clean up README.md (#958) * [graphql-serverless-contentful] Refractor getEnvironment (#939) * [apollo-serverless-contentful] cleanup tasks (#981) * [serverless-apollo-contentful] Unit test for utils/sqs/is-offline.ts (#985) * [serverless-apollo-contentful] Unit test for utils/sqs/is-offline.ts (#973) * [serverless-apollo-contentful] Unit test for utils/redis.ts (#1014) * [serverless-apollo-contentful] Unit test for utils/redis.ts (#970) * chore: sendMessage test (#1016) * [serverless-apollo-contentful] Unit test for utils/sqs/getQueueUrl.ts (#1021) * [serverless-apollo-contentful] Add contenful status to healthcheck endpoint (#1033) * [serverless-apollo-contentful] Unit test for utils/sqs/client.ts (#1025) * [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-handler.ts (#1034) * [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-handler.ts#1019 * [serverless-apollo-contentful] Fix: Refactor Unit tests: healthcheck.test.ts (#1035) * [serverless-apollo-contentful] Queueing feature documentation (#1043) * [serverless-apollo-contentful] Configure test coverage report to ignore all index.ts files (#1044) * [serverless-apollo-contentful] Change all test.ts to spec.ts (#1059) * chore: update deployment section. (#1057) * [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-generate-job.ts (#1047) * [serverless-apollo-contentful] Clean up src/schema/technology/technology.resolvers.test.ts (#1063) * [serverless-apollo-contentful] Clean up src/schema/technology/technology.resolvers.test.ts#1045 * chore: update readme (#1092) * fix: mock KeyV (#1112) * fix: readme grammar corrections (#1108) Co-authored-by: Mark S. Shenouda <[email protected]> Co-authored-by: William Hutt <[email protected]> Co-authored-by: Maarten Bicknese <[email protected]> Co-authored-by: Ian Sam Mungai <[email protected]> Co-authored-by: Ihar Dziamidau <[email protected]> Co-authored-by: Sochima Biereagu <[email protected]> Co-authored-by: Ian Mungai <[email protected]>
ghost
pushed a commit
that referenced
this pull request
Mar 20, 2023
* deleted demo section (#1024) * chore(remix-gql-tailwind): deps minor upgrades (#1037) * chore(vue3-apollo-quasar): deps minor upgrades (#1041) * chore(svelte-kit-scss): deps minor version upgrades (#1040) * chore(solidjs-tailwind): deps minor upgrades (#1038) * chore(qwik-graphql-tailwind): update dep minor versions (#1036) * chore(next12-react-query-tailwind): minor ver dep upgrades (#1030) * chore(express-typorm-postgres): Minor version dep upgrades (#1029) * chore(express-typorm-postgres): minor version dep upgrades * fix(express-typeorm-postgres): handle type issues * chore(angular-ngrx-scss): upgrade latest minor versions (#1028) * chore: add warning to readme file (#1050) * Solidstart fix: commands failing (#1052) * fix: failing commands * fix: updated deprecated libraries * add pnpm peer dependency rules * chore: updates Angular-apollo-tailwind for minor updates/patches (#1013) * chore(deno-oak-denodb): updated dep minor versions (#1055) * Expo zustand styled components kit (#504) * Expo init (#434) * Init expo * Setup storybooks * Expo-Zustand-Styled-Components Button component (#474) * feat: Button component * Added the test * Update border color * remove unused comment * EZSC Home screen (#484) * feat: Button component * Added the test * Update border color * remove unused comment * Setup absolute imports * Added homepage * added the right font color * rename useCount to useCounter * feat: About page (#485) * EZSC - Web header bug (#522) * added dev-server to run expo web * modify RN Image to have a definite size when in web platform * lock deps * final cleanup * fix typos --------- Co-authored-by: Chinedu Ekene Okpala <[email protected]> * chore(nuxt2-pinia-tailwind): Minor version dep upgrades (#1027) * chore(nuxt2-pinia-tailwind): minor upgrade deps * fix: roll back breaking changes * fix: updated pinia patch version * fix(nuxt2-pinia-tailwind): roll back upgrades causing breaking changes * added missing library (#1062) * Add Expo starter to CLI command list (#1075) * [Expo] Update dependencies to latest (#1078) * fix: lock package versions (#1089) * feat: introduce serverless-apollo-contentful kit 🎉 (#586) * [GraphQL-Serverless-Contentful] Init the starter (#524) * Init the project * Added serverless * Rename the starter * move to serverless * remove the hello handler * static analysis testing * removing the .build dir * add .build to .gitignore * .editorconfig * added name and description package.json * added prettier rules * feat: Add Apollo and tests to the kit (#527) * feat: Add testing to the kit * add tsconfig.test * Fix typescript jest * fixed codegen * fix: the test * feat: adds healthcheck (#543) * [GraphQL-Serverless-Contentful] Add Contentful to the project (#529) * feat: Add testing to the kit * add tsconfig.test * Fix typescript jest * fixed codegen * fix: the test * Add contentful to the project * Add the post query mutation * Add the update mutation * added graphql.schema to git ignore * deleted graphql.schema.json * Add the comment model * [graphql-pod-kit1] Create README For Graphql-Serverless Kit (#558) * [GraphQL-Serverless-Contentful] Readme.md * remove the showcase * Update starters/graphql-serverless-contentful/README.md Co-authored-by: Jessica Wilkins <[email protected]> Co-authored-by: Jessica Wilkins <[email protected]> * chore: adding serverless icons and updating config file * updating graphql kit name * locking down dependecies * adding starter kit card to main site * adding hasShowcase boolean to package.json * updating starter kit name in package.json * updating order for starter kit card * updating starter kit name in serverless yaml file * updating starter kits json file * [GraphQL-Serverless-Contentful] Add seeding script to the starter kit (#585) * Add seeding script * fix: replace symbol for comma Co-authored-by: Maarten Bicknese <[email protected]> * chore: update all packages Automatically update all packages to their latest versions by using npm check updates. Closes: #791 Relates to: #792 * chore: update to latest schema * feat: use tabs over spaces * chore: format all files and fix lint * chore: convert all files to use tabs Closes: #794 * fix: restore 2 spaces for yml * fix: missing@graphql-tools/merge (#825) * fix: missing@graphql-tools/merge * chore: pin dep * chore: verify pnpm (#816) * [serverless-apollo-contentful] Change jest.config to be typescript#827 (#829) * [serverless-apollo-contentful] Add missing .env file instructions (#820) * init * add screenshots * docs: update content model docs Co-authored-by: Maarten Bicknese <[email protected]> * [serverless-apollo-contentful] Create Technology model (#861) * feat: jest setup mocks and env * chore: graphql-tools executor * add tests * chore: replicate post tests * fix: typedefs * fix: Post -> Comment * fix: content * update tests * fix: tests for comments * fix: format * Update starters/graphql-serverless-contentful/src/schema/post/post.resolver.test.ts Co-authored-by: Maarten Bicknese <[email protected]> * chore: check if the have been called with * feat: implement technology model * chore: clean up old code * docs: update readme for technology model Closes: #851 * chore: remove left-over code * fix: improve small issues * fix: remove unused line Co-authored-by: Ian Mungai <[email protected]> Co-authored-by: kodejuice <[email protected]> * [serverless-apollo-contentful] Update project structure and technology decisions explanation & Deployment in README (#874) * chore: update readme * fix: remove screenshot * [serverless-apollo-contentful] Add caching to kit (#897) * add redis cache * add redis instructions and docker container * add docker commands and format * move redis client * use official redis image * cache ttl * Update starters/graphql-serverless-contentful/README.md * add redis info to tech section in readme * fix healthcheck - follow spec * Update healthcheck.ts * [serverless-apollo-contentful] Add database migration (#935) * chore: add database migration & add to readme * fix: technology migration * fix: prettier format * [serverless-apollo-contentful] Add queueing to kit (#952) * init * setup handler and generator * iamRoleStatements * complete README * Update starters/graphql-serverless-contentful/package.json * typo * remove params * remove extra port * undefined return type * add env titles * rename port * add hint to job message * remove caret * [serverless-apollo-contentful] Clean up README.md (#958) * [graphql-serverless-contentful] Refractor getEnvironment (#939) * chore: migrations (#964) * [GraphQL-Serverless-Contentful] Init the starter (#524) * feat: Add Apollo and tests to the kit (#527) * feat: adds healthcheck (#543) * [GraphQL-Serverless-Contentful] Add Contentful to the project (#529) * [graphql-pod-kit1] Create README For Graphql-Serverless Kit (#558) * fix: missing@graphql-tools/merge (#825) * chore: verify pnpm (#816) * [serverless-apollo-contentful] Change jest.config to be typescript#827 (#829) * [serverless-apollo-contentful] Add missing .env file instructions (#820) * [serverless-apollo-contentful] Create Technology model (#861) * [serverless-apollo-contentful] Update project structure and technology decisions explanation & Deployment in README (#874) * [serverless-apollo-contentful] Add caching to kit (#897) * [serverless-apollo-contentful] Add database migration (#935) * [serverless-apollo-contentful] Add queueing to kit (#952) * [serverless-apollo-contentful] Clean up README.md (#958) * [graphql-serverless-contentful] Refractor getEnvironment (#939) * [apollo-serverless-contentful] cleanup tasks (#981) * [serverless-apollo-contentful] Unit test for utils/sqs/is-offline.ts (#985) * [serverless-apollo-contentful] Unit test for utils/sqs/is-offline.ts (#973) * [serverless-apollo-contentful] Unit test for utils/redis.ts (#1014) * [serverless-apollo-contentful] Unit test for utils/redis.ts (#970) * chore: sendMessage test (#1016) * [serverless-apollo-contentful] Unit test for utils/sqs/getQueueUrl.ts (#1021) * [serverless-apollo-contentful] Add contenful status to healthcheck endpoint (#1033) * [serverless-apollo-contentful] Unit test for utils/sqs/client.ts (#1025) * [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-handler.ts (#1034) * [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-handler.ts#1019 * [serverless-apollo-contentful] Fix: Refactor Unit tests: healthcheck.test.ts (#1035) * [serverless-apollo-contentful] Queueing feature documentation (#1043) * [serverless-apollo-contentful] Configure test coverage report to ignore all index.ts files (#1044) * [serverless-apollo-contentful] Change all test.ts to spec.ts (#1059) * chore: update deployment section. (#1057) * [serverless-apollo-contentful] Add Unit tests: src\handlers\sqs-generate-job.ts (#1047) * [serverless-apollo-contentful] Clean up src/schema/technology/technology.resolvers.test.ts (#1063) * [serverless-apollo-contentful] Clean up src/schema/technology/technology.resolvers.test.ts#1045 * chore: update readme (#1092) * fix: mock KeyV (#1112) * fix: readme grammar corrections (#1108) Co-authored-by: Mark S. Shenouda <[email protected]> Co-authored-by: William Hutt <[email protected]> Co-authored-by: Maarten Bicknese <[email protected]> Co-authored-by: Ian Sam Mungai <[email protected]> Co-authored-by: Ihar Dziamidau <[email protected]> Co-authored-by: Sochima Biereagu <[email protected]> Co-authored-by: Ian Mungai <[email protected]> * solidjs-fix: remove husky (#1121) * solidjs-fix: remove husky * pinned packages * Solidstart fix: package stable configuration (#1124) * wip * pin all the right dependencies in package.json * fix: README.md image addresses for starter.dev website (#1132) * fix: README.md image addresses for starter.dev website * chore: update 1st image to be consistent with other images * solidstart-fix: clean up code (#1128) * solidstart-fix: clean up code * revert stupid changes * last fix * format the code * chore: rename kit (#1131) * feat: 1125 alphabetize the cli list of kits (#1135) * sort kits alphabetically by title * enable autocomplete for easier searching of kits * release: cli v0.1.5 * chore: update readme to fix image addresses (#1139) * bump/open package dependency (#1110) * bump/open package dependency * update script call -> prepare * Revert "bump/open package dependency (#1110)" (#1140) This reverts commit fdb1535. * fix: cleanup repo (#1150) * chore: 186 generate starter kits (#1156) * Created a script that generates the starter-kits.json file --> `scripts/generate-starter-kits.json.js` * It can be executed by running `yarn generate-starter-kits-json` * Added CI that verifies if `starter-kits.json` is up to date * fix: 940 remove problematic viewBox in HeroRectangleBg (#1155) * [next12-chakra ui] Adding NextJS 12 and Chakra UI kit to main site (#653) * chore: setting up prettier configuration (#475) * chore: installing prettier * fix: removing lock file and changing extension for readme * chore: setting up precommit hook * removing pre commit hook * fix:updating rules in prettier rc file * fix: prettier command * docs: adding section about prettier commands * fix: spelling errors in readme * feat: adding fetch example (#488) * feat: adding fetch example * style: homepage * adding styles * refactoring to use getServerSideProps * fix: removing console statement * fix: routing * refactoring pages * feat: adding counter example to NextJS and Chakra UI kit (#520) * refactor: header styles and counter example * feat: adding button states * refactoring styles * fix: dependencies * refactor: theme color object * fix: removing unused import * style: adding margin right for heading in counter * [Next-ChakraUI kit] setting up storybook (#570) * chore: setting up storybook * locking down storybook versions * updating directory name to next12 * [Next12-ChakraUI kit] adding jest testing (#594) * chore: adding jest testing * fixing incorrect test name in fetch example * [nextjs12-chakra ui] adding chakra ui icon (#634) * chore: adding chakra ui icon * updating icon name to nextjs 12 * replacing broken API endpoint * adding kit to starter kits json file * chore: updating README and fixing formatting (#632) * updating api endpoint in readme * fixing repsonsive errors for counter * removing toc comments from readme * fixing storybook counter example * removing chakra ui storybook defaults * fix: remove home module css file * refactor: refactoring components strucuture * refactor: fetch example * docs: updating readme * fix: broken tests * refactor: lifting state up * docs: updating readme * fix: apply changes from self review * fix: applying code review changes * fix: resolving errors from sonarcloud * fix: removing duplication for counter test * fix: removing extra file * docs: updating heading level * fix: reordering kits * [expo-Zustand-Styled-Components] feat: Readme file (#1157) * feat: readmefile * fix: ci * fix: Expo kit readme repository link (#1161) * Feature/790 generator metrics tracking (#1153) * feat: initial implementation of tracking * feat: initial implementation of tracking handler * feat: set up serverless handler dev mode and deploy * fix: send measurement to the actual measurement api * fix: applied code review change requests * docs: added readme to metrics-handler * feat: set up deployment workflow, use production url * fix: updating broken showcase links in readmes (#1165) * fix(angular-ngrx-scss): fix deps (#1176) * fix(varied): update hello api endpoints to new working endpoint (#1174) * Update mh-deploy.yml (#1179) I am not sure this is the right change, because I actually don't fully understand what is being configured with the `working-directory` element ...but it makes the squiggly lines go away! 😄 * [Next & Chakra kit]fix: incorrect import link and missing attributes in stories file (#1178) * fix: counter stories and fetch import * fix: correct file name for Counter * [serverless-framework-apollo-contentful] Fixes and reworks for a polished kit (#1160) * chore: remove AWS reference * fix: start dev setup without errors or warnings * fix: overal codebase imrovements * feat: split technology and technologies queries * fix: show errors as object instead of json string * refactor: wrap update fields in input type * fix: improve typing and tests * refactor: change model to es6 modules * test: rewrite resolver tests * Update starter-kits.json * feat: introduce pagination to getAll * fix: resolve issues in the website * fix ensure description matches starter kit json --------- Co-authored-by: Mattia <[email protected]> Co-authored-by: Dane Grant <[email protected]> Co-authored-by: William Hutt <[email protected]> Co-authored-by: Mark S. Shenouda <[email protected]> Co-authored-by: Chinedu Ekene Okpala <[email protected]> Co-authored-by: Adam L Barrett <[email protected]> Co-authored-by: Jessica Wilkins <[email protected]> Co-authored-by: Mark S. Shenouda <[email protected]> Co-authored-by: William Hutt <[email protected]> Co-authored-by: Maarten Bicknese <[email protected]> Co-authored-by: Ian Sam Mungai <[email protected]> Co-authored-by: Ihar Dziamidau <[email protected]> Co-authored-by: Sochima Biereagu <[email protected]> Co-authored-by: Chris Trześniewski <[email protected]> Co-authored-by: Tápai Balázs <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Summary of change
Checklist