MCPcopy
hub / github.com/bnoguchi/everyauth / attr

Function attr

test/util/expect.js:400–412  ·  view source on GitHub ↗

* Generate an attr assertion function for the given attr `name`. * * @param {String} name * @return {Function} * @api private

(name)

Source from the content-addressed store, hash-verified

398 */
399
400function attr(name) {
401 return function(expected){
402 var elem = this.obj
403 , val = elem.attr(name);
404
405 this.assert(
406 expected == val
407 , 'expected ' + j(elem) + ' to have ' + name + ' ' + i(expected) + ', but has ' + i(val)
408 , 'expected ' + j(elem) + ' to not have ' + name + ' ' + i(expected));
409
410 return this;
411 }
412}

Callers 1

expect.jsFile · 0.85

Calls 1

jFunction · 0.85

Tested by

no test coverage detected