Skip to content

Instantly share code, notes, and snippets.

View james-brndwgn's full-sized avatar

James james-brndwgn

View GitHub Profile
@james-brndwgn
james-brndwgn / e2e-unit-testing.md
Last active May 2, 2018 02:37
TL;DR Unit & e2e Testing

Unit Testing vs. End to End Testing:

Unit/Component:

  • Test a single Component, Service, Pipe etc.
  • Test a single specific behaviour in a controlled environment
  • Mock everything you need to test this functionality
  • Use code coverage analysis to make sure everything is covered
  • (Usually) Improves code structure and quality
  • Test edge cases on the most detailed level
  • Know if a change breaks a specific behaviour
@james-brndwgn
james-brndwgn / components.md
Last active May 19, 2021 17:28 — forked from iclanzan/components.md
UI Component Name Ideas

UI component names

Interactive components

  • button
  • switch
  • toggle
  • slider
  • handle
  • tab
@james-brndwgn
james-brndwgn / coding-cheatsheet.md
Last active June 27, 2019 00:00
Coding Cheatsheet

Javascript Tricks

Arrays

Easily convert NodeList/HTMLCollection to Array with ES6 spread operator

const arr = [...document.querySelectorAll('div')];

Vue

Unique ID generator for keys. Reuse uid if already exist on object.