How to quickly test the front end | Angular | Testing | Chart.js | ng2-charts | Aelli codes

preview_player
Показать описание
In this tutorial you will learn how to quickly test your front end if you don't want or can't use a test framework, or don't want to spend time on testing APIs, etc.

01:19 - generate interceptor: ng g interceptor appInterceptor (or any other better name :P)
{
provide: HTTP_INTERCEPTORS,
useClass: AppInterceptorInterceptor,
multi: true
}
04:28 - catching the request in the interceptor ("endsWith" instead of "startsWith")
return new Observable(observer =angle bracket (YouTube doesn't like angle brackets) {
});
}
05:55 - fake data to return
const userData = [
{
monday: { savedMoney: 14.5 },
tuesday: { savedMoney: 25.14 },
wednesday: { savedMoney: 3.17 },
},
{
monday: { savedMoney: 34.1 },
tuesday: { savedMoney: 1.5 },
wednesday: { savedMoney: 29.64 },
}
];

If this video was helpful for you, please hit that Like Button and subscribe for more! It really motivates me! :)
Comment what do you want to see next!
#angular #chartjs #ng2charts #test
Рекомендации по теме