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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="style.css"> | |
<title>CSS</title> | |
</head> | |
<body> |
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
it('should', async () => { | |
const componentMock = componenstDrag[0]; | |
directive = new DragDirective(componentMock); | |
directive.setReferences(); | |
const event = { | |
target: { | |
id: "id", | |
classList: { | |
add: jest.fn(), | |
} |
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
it('should call messageServiceStub.warning when throw error', () => { | |
storeServiceStub.createStore = jest.fn().mockReturnValue( | |
throwError({ | |
id: 'id', | |
}), | |
); | |
component.addStore(newStore); | |
expect(messageServiceStub.warning).toHaveBeenCalledWith('Houve um erro ao criar a loja'); | |
}); |
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
import { Injectable } from '@angular/core'; | |
import { FormBuilder, FormGroup } from '@angular/forms'; | |
@Injectable({ | |
providedIn: 'root', | |
}) | |
export class FormBuilderService { | |
form: FormGroup; |
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
<p>{{user.firstname}} {{user.lastname}} {{user.age}}</p> |
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
"scripts": { | |
"test": "jest", | |
"test:watch": "jest --watchAll", | |
"test:watch:cvr": "jest --watchAll --coverage" | |
}, |
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
"jest": { | |
"preset": "jest-preset-angular", | |
"setupFilesAfterEnv": ["<rootDir>/setupJest.ts"] | |
} |
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
import 'jest-preset-angular'; |
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
/* ....../index.spec.js */ | |
const server = require('./server') | |
test('should true is equal true rs',() => { | |
//um teste qualquer apenas pra chamar o seu método e provocar o erro | |
server() | |
expect(true).toBe(true) | |
}) | |
NewerOlder