github.com/DerekStrickland/consul@v1.4.5/ui-v2/tests/integration/helpers/default-test.js (about) 1 import { moduleForComponent, test } from 'ember-qunit'; 2 import hbs from 'htmlbars-inline-precompile'; 3 4 moduleForComponent('default', 'helper:default', { 5 integration: true, 6 }); 7 8 // Replace this with your real tests. 9 test('it renders', function(assert) { 10 this.set('inputValue', '1234'); 11 12 this.render(hbs`{{default inputValue}}`); 13 14 assert.equal( 15 this.$() 16 .text() 17 .trim(), 18 '1234' 19 ); 20 }); 21 test('it renders the default value', function(assert) { 22 this.set('inputValue', ''); 23 24 this.render(hbs`{{default inputValue '1234'}}`); 25 26 assert.equal( 27 this.$() 28 .text() 29 .trim(), 30 '1234' 31 ); 32 });