Untitled
unknown
javascript
2 years ago
920 B
16
Indexable
// SINGLE LAYER
test('login with correct credentials returns success', () => {
// Test implementation...
});
test('login with wrong credentials returns error', () => {
// Test implementation...
});
test('register with valid details creates a new user', () => {
// Test implementation...
});
test('register with existing email returns error', () => {
// Test implementation...
});
// NESTED TESTS
describe('User Authentication', () => {
describe('Login', () => {
test('returns success for correct credentials', () => {
// Test implementation...
});
test('returns error for wrong credentials', () => {
// Test implementation...
});
});
describe('Registration', () => {
test('creates a new user with valid details', () => {
// Test implementation...
});
test('returns error for an existing email', () => {
// Test implementation...
});
});
});
Editor is loading...
Leave a Comment