Skip to content

Instantly share code, notes, and snippets.

@smalljam
Created December 18, 2011 16:41
Show Gist options
  • Save smalljam/1493866 to your computer and use it in GitHub Desktop.
Save smalljam/1493866 to your computer and use it in GitHub Desktop.
jsTestDriver assertions
function assertInterface(keys, _interface) {
keys.forEach(function(key){
assertFunction(_interface[key]);
});
}
function assertStrictInterface(keys, _interface) {
assertEquals(keys, Object.keys(_interface));
assertInterface(keys, _interface);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment