Skip to content

Instantly share code, notes, and snippets.

@jrr
jrr / custom-qunit-assertions.js
Created November 10, 2016 02:43
custom qunit assertions
import QUnit from 'qunit';
QUnit.assert.contains = function( haystack, needle, message ) {
var result = haystack.indexOf(needle) > -1;
this.pushResult( {
result: result,
actual: haystack,
expected: needle,
message: message || `'${haystack}' contains string '${needle}'`
});
import Ember from 'ember';
export default Ember.Component.extend({
});
@jrr
jrr / EXPMatchers+equalInAnyOrder.h
Created December 21, 2014 05:11
Expecta NSArray-as-NSCountedSet matcher
#import "Expecta.h"
EXPMatcherInterface(equalInAnyOrder, (id expected));
// 1st argument is the name of the matcher function
// 2nd argument is the list of arguments that may be passed in the function
// call.
// Multiple arguments are fine. (e.g. (int foo, float bar))