Skip to content

Instantly share code, notes, and snippets.

View monostere0's full-sized avatar

Daniel monostere0

  • Amsterdam, Netherlands
View GitHub Profile
@monostere0
monostere0 / enzyme_render_diffs.md
Created February 4, 2019 09:44 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@monostere0
monostere0 / http-service.ts
Created August 18, 2016 11:38 — forked from tomasstankovic/http-service.ts
Angular 2 Http interceptor
import { Injectable } from '@angular/core';
import {
Http,
ConnectionBackend,
RequestOptions,
RequestOptionsArgs,
Response,
Headers
} from '@angular/http';
import { Observable } from 'rxjs/Observable';
@monostere0
monostere0 / destructuring.js
Created April 25, 2016 15:05 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];