Skip to content

Instantly share code, notes, and snippets.

View FelixRilling's full-sized avatar

Felix Rilling FelixRilling

View GitHub Profile
@FelixRilling
FelixRilling / index.html
Last active September 14, 2021 07:47
box-shadow-image encoder
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>Box Shadow Image</title>
<style>
*,
::before,
@FelixRilling
FelixRilling / mocking.js
Created March 24, 2019 09:49
Basic mockito-style mocking and stubbing in JavaScript
const mockField = Symbol("mockField");
class Stub {
constructor(mockTarget, property, receiver, matchers = []) {
this.mockTarget = mockTarget;
this.property = property;
this.receiver = receiver;
this.matchers = matchers;
this.mocked = () => null;