Skip to content

Instantly share code, notes, and snippets.

Avatar

Felix Rilling FelixRilling

View GitHub Profile
@FelixRilling
FelixRilling / index.html
Last active Sep 14, 2021
box-shadow-image encoder
View index.html
<!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 Mar 24, 2019
Basic mockito-style mocking and stubbing in JavaScript
View mocking.js
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;