Комментарии:
1 like and a subscribe does not suffice u, u r amazing, thank uu
Ответитьthank you for lesson - Unit Testing Tutorial with Jest - Part 1
Ответить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
I just love it when the keyboard is abused. Oh wait, where's part 2?
ОтветитьNice video man.
Ответить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.
Ответитьvery nice. Thank you so much.
Ответить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.
Cool! Can you tell me how to integrate jquery with it?
ОтветитьGood, waiting for more.
Ответить