Skip to content

Commit 63daf25

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 9bfce03 + 426c325 commit 63daf25

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

readme.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,8 @@ beforeEach(() => {
10211021
id: 1,
10221022
name: 'John',
10231023
});
1024-
});```
1024+
});
1025+
```
10251026

10261027
</details>
10271028

@@ -1120,7 +1121,6 @@ beforeEach(() => {
11201121

11211122
• Observability - Some things must be monitored, like errors or remarkable business events. When a transaction fails, not only we expect the right response but also correct error handling and proper logging/metrics. This information goes directly to a very important user - The ops user (i.e., production SRE/admin)
11221123

1123-
</details>
11241124

11251125
<br/><br/>
11261126

@@ -1502,14 +1502,13 @@ before(() => {
15021502
})
15031503

15041504
// happens before EACH test
1505-
beforeEach(setUser => () {
1506-
cy.visit('/home', {
1507-
onBeforeLoad (win) {
1505+
beforeEach(setUser => {
1506+
cy.visit('/home', () => {
1507+
onBeforeLoad (win => {
15081508
win.localStorage.setItem('token', JSON.stringify(authenticationToken))
1509-
},
1509+
})
15101510
})
15111511
})
1512-
15131512
```
15141513

15151514
</details>
@@ -1567,8 +1566,8 @@ it("When doing smoke testing over all page, should load them all successfully",
15671566

15681567
![](https://img.shields.io/badge/🔨%20Example%20using%20Cucumber-blue.svg "Examples using Cucumber")
15691568

1570-
```javascript
1571-
// this is how one can describe tests using cucumber: plain language that allows anyone to understand and collaborate
1569+
```text
1570+
This is how one can describe tests using cucumber: plain language that allows anyone to understand and collaborate
15721571
15731572
Feature: Twitter new tweet
15741573
@@ -1581,7 +1580,6 @@ Feature: Twitter new tweet
15811580
Given I type "Hello followers!" in the textbox
15821581
Given I click on "Submit" button
15831582
Then I see message "Tweet saved"
1584-
15851583
```
15861584

15871585
### :clap: Doing It Right Example: Visualizing our components, their various states and inputs using Storybook
@@ -1803,7 +1801,7 @@ it.skip("Test name", () => {// *error:no-skipped-tests, error:error:no-global-te
18031801
expect("somevalue"); // error:no-assert
18041802
});
18051803

1806-
it("Test name", () => {*//error:no-identical-title. Assign unique titles to tests
1804+
it("Test name", () => {// *error:no-identical-title. Assign unique titles to tests
18071805
});
18081806
```
18091807

@@ -1853,23 +1851,23 @@ Practically, some CI vendors (Example: [CircleCI local CLI](https://circleci.com
18531851

18541852
### :clap: Doing It Right Example: npm scripts that perform code quality inspection, all are run in parallel on demand or when a developer is trying to push new code
18551853

1856-
```javascript
1857-
"scripts": {
1854+
```json
1855+
{
1856+
"scripts": {
18581857
"inspect:sanity-testing": "mocha **/**--test.js --grep \"sanity\"",
18591858
"inspect:lint": "eslint .",
18601859
"inspect:vulnerabilities": "npm audit",
18611860
"inspect:license": "license-checker --failOn GPLv2",
18621861
"inspect:complexity": "plato .",
1863-
18641862
"inspect:all": "concurrently -c \"bgBlue.bold,bgMagenta.bold,yellow\" \"npm:inspect:quick-testing\" \"npm:inspect:lint\" \"npm:inspect:vulnerabilities\" \"npm:inspect:license\""
18651863
},
18661864
"husky": {
18671865
"hooks": {
18681866
"precommit": "npm run inspect:all",
18691867
"prepush": "npm run inspect:all"
18701868
}
1869+
}
18711870
}
1872-
18731871
```
18741872

18751873
</details>
@@ -1933,13 +1931,12 @@ The huge Kubernetes ecosystem is yet to formalize a standard convenient tool for
19331931

19341932
### :clap: Doing It Right Example:
19351933

1936-
```javascript
1937-
//install license-checker in your CI environment or also locally
1934+
```shell
1935+
# install license-checker in your CI environment or also locally
19381936
npm install -g license-checker
19391937

1940-
//ask it to scan all licenses and fail with exit code other than 0 if it found unauthorized license. The CI system should catch this failure and stop the build
1938+
# ask it to scan all licenses and fail with exit code other than 0 if it found unauthorized license. The CI system should catch this failure and stop the build
19411939
license-checker --summary --failOn BSD
1942-
19431940
```
19441941

19451942
<br/>

0 commit comments

Comments
 (0)