github.com/outbrain/consul@v1.4.5/ui-v2/tests/integration/components/code-editor-test.js (about) 1 import { moduleForComponent, test } from 'ember-qunit'; 2 import hbs from 'htmlbars-inline-precompile'; 3 4 moduleForComponent('code-editor', 'Integration | Component | code editor', { 5 integration: true, 6 }); 7 8 test('it renders', function(assert) { 9 // Set any properties with this.set('myProperty', 'value'); 10 // Handle any actions with this.on('myAction', function(val) { ... }); 11 12 this.render(hbs`{{code-editor}}`); 13 14 // this test is just to prove it renders something without producing 15 // an error. It renders the number 1, but seems to also render some sort of trailing space 16 // so just check for presence of CodeMirror 17 assert.equal(this.$().find('.CodeMirror').length, 1); 18 19 // Template block usage: 20 this.render(hbs` 21 {{#code-editor}}{{/code-editor}} 22 `); 23 assert.equal(this.$().find('.CodeMirror').length, 1); 24 });