Unit Testing Tutorial with Jest - Part 1

Unit Testing Tutorial with Jest - Part 1

Classsed

5 лет назад

16,332 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@jimread4099
@jimread4099 - 29.12.2020 14:10

1 like and a subscribe does not suffice u, u r amazing, thank uu

Ответить
@dimitriitkach7697
@dimitriitkach7697 - 10.12.2020 18:25

thank you for lesson - Unit Testing Tutorial with Jest - Part 1

Ответить
@sureshkct
@sureshkct - 10.07.2020 22:21

How to resolve the issue ?

c:\Sample_Project\classsed-jest-part>jest ./js/index.test.js
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Sample_Project\classsed-jest-part
9 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 2 matches
testPathIgnorePatterns: \\node_modules\\ - 9 matches
testRegex: - 0 matches
Pattern: .\\js\\index.test.js - 0 matches

Ответить
@JohnSourvinos
@JohnSourvinos - 08.07.2020 18:31

I just love it when the keyboard is abused. Oh wait, where's part 2?

Ответить
@MsJoshzman93
@MsJoshzman93 - 04.03.2020 22:55

Nice video man.

Ответить
@praveenkumarganesh
@praveenkumarganesh - 06.11.2019 12:43

Also the command jest./js/index is not working as the git bash shows jest command not found though the Jest is installed properly. So can you please let me know what should be done.

Ответить
@imhappynow8471
@imhappynow8471 - 15.10.2019 22:56

very nice. Thank you so much.

Ответить
@kinvain
@kinvain - 21.07.2019 22:19

But this is not a unit tests. In unit tests, you should mock all other methods except for the one you are testing right now.


For instance, when you are writing tests for validateConfirmPassword you should mock a validatePassword method to return a predefined value and then set an expectation that a setValidationRes will be called with certain arguments.


Otherwise, as you mention is the beginning of the video this gonna be an integration test.

Ответить
@thecomputerm4951
@thecomputerm4951 - 05.07.2019 10:12

Cool! Can you tell me how to integrate jquery with it?

Ответить
@noiser564
@noiser564 - 07.02.2019 17:35

Good, waiting for more.

Ответить