I started using Jasmine. I want to test a validation function but I don't know how to do it.
I wrote the first case. How can I get a message in the event of an error?
Any help will be important to me.
describe('First test, function() {
it('First case', function() {
expect({login: 'first_user'}).toEqual({login: jasmine.stringMatching(/^[A-Za-z-ĘÓŁŚĄŻŹĆŃęółśążźćń0-9.\-_ /]+$/)});
expect({haslo: 'FirstUser!1'}).toEqual({haslo: jasmine.stringMatching(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/)});
})
})