github.com/outbrain/consul@v1.4.5/ui-v2/tests/unit/utils/makeAttrable-test.js (about) 1 import { module } from 'ember-qunit'; 2 import test from 'ember-sinon-qunit/test-support/test'; 3 import makeAttrable from 'consul-ui/utils/makeAttrable'; 4 module('Unit | Utils | makeAttrable', {}); 5 6 test('it adds a `attr` method, which returns the value of the property', function(assert) { 7 const obj = { 8 prop: true, 9 }; 10 const actual = makeAttrable(obj); 11 assert.equal(typeof actual.attr, 'function'); 12 assert.ok(actual.attr('prop')); 13 });