Cristian Marquez
@thecapnews
github.com/xthecapx
Testing your apps with Jasime
class CreatingAnApp() {
person: Person;
constructor() {
if (fileSystem.existsSync('./creating-an-app.spec.ts')) {
person.lazy = true;
} else {
person.happy = true;
}
}
}"Let's start with a clear message"
View
Component
Service
¿What should be tested?
Directive
Unit Testing the component
Component
async(() => {
TestBed.configureTestingModule({
...
}).compileComponents();
})new ClassName( ... );Unit Testing the view
View
async(() => {
TestBed.configureTestingModule({
...
}).compileComponents();
})Unit Testing the services
Services
new ClassName( ... );¿How should you test your angular directives?