Skip to content

Instantly share code, notes, and snippets.

View shinypb's full-sized avatar
☀️
I'm just happy to be here.

Mark Christian shinypb

☀️
I'm just happy to be here.
View GitHub Profile
expect(x).toEqual(y); compares objects or primitives x and y and passes if they are equivalent
expect(x).toBe(y); compares objects or primitives x and y and passes if they are the same object
expect(x).toMatch(pattern); compares x to string or regular expression pattern and passes if they match
expect(x).toBeDefined(); passes if x is not undefined
expect(x).toBeUndefined(); passes if x is undefined
@shinypb
shinypb / controller.js
Last active December 12, 2015 07:49 — forked from darobin/controller.js
var fallbacks = {}
, networks = {}
, cacheName = "OldSchoolAppCache"
, settings = {}
;
this.onmessage = function (e) {
var msg = e.data;
if (msg.type && msg.type === "manifest") {
var lines = msg.manifest.split(/\n+/)