Skip to content

Instantly share code, notes, and snippets.

View cironunes's full-sized avatar
🎯
Focusing

Ciro Nunes cironunes

🎯
Focusing
View GitHub Profile
it('should return an Observable<SearchResults>', () => {
service.search('users', dummyParams)
.subscribe(result => {
expect(result.items.length).toBe(2);
});
const req = httpMock.expectOne(`${service.API_URL}/search/users?q=cironunes`);
expect(req.request.url).toBe(`${service.API_URL}/search/users`);
expect(req.request.params).toEqual(dummyParams);
afterEach(() => {
httpMock.verify();
});
@cironunes
cironunes / loading.interceptor.ts
Created September 6, 2017 16:16
Loading interceptor
import { HttpInterceptor, HttpEvent, HttpRequest, HttpHandler } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
export class LoadingInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const loadingReq = req.clone({
reportProgress: true
});
@cironunes
cironunes / medicos.md
Last active October 20, 2017 11:40 — forked from fernandosouza/medicos_dentistas_berlin.txt
Médicos e dentistas brasileiros em berlin

Clínica geral

Marcus Thuma. Kant Praxis
Centro para medicina interna
Cardiologia, Gastroenterologia, Clínica Geral
Kurfürstendamm 42
10719 Berlim
Tel: (030) 88 71 44 60
Fax: (030) 88 71 44 619
@cironunes
cironunes / angular.json.md
Last active February 10, 2021 03:28
Firebase Cloud Function for Angular SSR
{
-  "outputPath": "dist/piggybank", 
+  "outputPath": "functions/dist/piggybank",
-  "outputPath": "dist/piggybank-server",
+  "outputPath:": "functions/dist/piggybank-server",
}