-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Running prettier formatter on the project (#923)
* npm run prettier * npm run prettier Run `npm run prettier`. Add `yarn prettier` to qa.yml. * Run only prettier check in CI
- Loading branch information
Showing
93 changed files
with
2,405 additions
and
1,814 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
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 |
---|---|---|
|
@@ -36,6 +36,7 @@ Install dependencies: | |
```bash | ||
yarn | ||
``` | ||
|
||
Create environment variables: | ||
```bash | ||
cp .env.example .env | ||
|
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,62 +1,82 @@ | ||
import { anoymizeChild } from "../src/components/Feedback" | ||
import { anoymizeChild } from '../src/components/Feedback' | ||
|
||
describe('anonymize', () => { | ||
describe('#annoymizeChild', () => { | ||
const scenarios = [ | ||
{ input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '901006 / 6472', | ||
describe('#annoymizeChild', () => { | ||
const scenarios = [ | ||
{ | ||
input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '901006 / 6472', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, month: 10, year: 1990 }, | ||
{ input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '050426 / 9744', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, month: 4, year: 2005 }, | ||
{ input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '705426 / 0169', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, month: 4, year: 1970 }, | ||
{ input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '185717 / 4924', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, month: 7, year: 2018 }, | ||
{ input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '646118 / 6369', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, month: 11, year: 1964 }, | ||
] | ||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, | ||
month: 10, | ||
year: 1990, | ||
}, | ||
{ | ||
input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '050426 / 9744', | ||
|
||
scenarios.forEach(({ input, month, year }) => { | ||
it(`From personalID ${input.rodneCislo} get month ${month} and year ${year}`, () => { | ||
const anonym = anoymizeChild(input) | ||
expect(anonym.mesiacNarodenia).toBe(month) | ||
expect(anonym.rokNarodenia).toBe(year) | ||
expect(anonym.rodneCislo).toBe("anon") | ||
}) | ||
}) | ||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, | ||
month: 4, | ||
year: 2005, | ||
}, | ||
{ | ||
input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '705426 / 0169', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, | ||
month: 4, | ||
year: 1970, | ||
}, | ||
{ | ||
input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '185717 / 4924', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, | ||
month: 7, | ||
year: 2018, | ||
}, | ||
{ | ||
input: { | ||
id: 1, | ||
priezviskoMeno: '', | ||
rodneCislo: '646118 / 6369', | ||
|
||
wholeYear: false, | ||
monthFrom: '0', | ||
monthTo: '11', | ||
}, | ||
month: 11, | ||
year: 1964, | ||
}, | ||
] | ||
|
||
scenarios.forEach(({ input, month, year }) => { | ||
it(`From personalID ${input.rodneCislo} get month ${month} and year ${year}`, () => { | ||
const anonym = anoymizeChild(input) | ||
expect(anonym.mesiacNarodenia).toBe(month) | ||
expect(anonym.rokNarodenia).toBe(year) | ||
expect(anonym.rodneCislo).toBe('anon') | ||
}) | ||
}) | ||
}) | ||
}) | ||
}) |
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
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
Oops, something went wrong.