Open
Conversation
kmin-283
reviewed
Jun 28, 2021
Comment on lines
+1
to
+23
| { | ||
| "env": { | ||
| "browser": true, | ||
| "es2021": true, | ||
| "cypress/globals": true | ||
| }, | ||
| "extends": [ | ||
| "airbnb-base", | ||
| "plugin:cypress/recommended" | ||
| ], | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 12, | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": [ | ||
| "@typescript-eslint", | ||
| "cypress" | ||
| ], | ||
| "rules": { | ||
| "no-console": "off" | ||
| } | ||
| } |
kmin-283
reviewed
Jun 28, 2021
Comment on lines
+5
to
+15
| .reduce<Cypress.Chainable<JQuery<HTMLElement>>>( | ||
| (cyObj: Cypress.Chainable<JQuery<HTMLElement>>, f: string) => ( | ||
| cyObj | ||
| .get(/\d/.test(f) ? '.digit' : '.operation') | ||
| .contains(f) | ||
| .click() | ||
| ), | ||
| cy) | ||
| .get('#total').should((elem) => { | ||
| expect(elem.text()).to.equal(result); | ||
| }) |
There was a problem hiding this comment.
이 부분에서 저도 테스트 코드 작성하는 방법 배워갑니다!
그런데 click하는 부분이랑 검증하는 부분이랑 나눠져있었다면 어땠을까요?
kmin-283
reviewed
Jun 28, 2021
| expect(elem.text()).to.equal('0'); | ||
| }); | ||
| }); | ||
| }); No newline at end of file |
kmin-283
reviewed
Jun 28, 2021
Comment on lines
+1
to
+8
| { | ||
| "compilerOptions": { | ||
| "target": "es5", | ||
| "lib": ["es5", "dom"], | ||
| "types": ["cypress"] | ||
| }, | ||
| "include": ["**/*.ts"] | ||
| } No newline at end of file |
There was a problem hiding this comment.
cypress에서도 tsconfig 파일이 필요했군요...! 알아갑니다 👍
kmin-283
reviewed
Jun 28, 2021
|
|
||
| function onOperationClicked(e: Event) { | ||
| if (currVal !== undefined) { | ||
| prevVal = operateResult(prevVal ?? 0, currVal ?? 0, op); |
There was a problem hiding this comment.
operateResult에서 prevVal, currVal의 기본값으로 0을 받도록 하면 더 깔끔해질 것 같습니다!
kmin-283
reviewed
Jun 28, 2021
kmin-283
left a comment
There was a problem hiding this comment.
제가 환경 세팅하는 부분이 많이 부족한데 도움이 많이 됐습니다. 그리고 코드 읽기가 쉬워서 좋았습니다.
This file contains hidden or 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
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.
No description provided.