File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
__testfixtures__/ember-qunit-codemod Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ import { moduleForComponent , test } from 'ember-qunit' ;
2+ import hbs from 'htmlbars-inline-precompile' ;
3+
4+ moduleForComponent ( 'foo-bar' , 'Integration | Component | FooBar' , {
5+ integration : true
6+ } ) ;
7+
8+ test ( 'it happens' , function ( assert ) {
9+ assert . expect ( 1 ) ;
10+
11+ this . on ( 'test' , ( ) => assert . ok ( true ) ) ;
12+ this . render ( hbs `{{test-component test="test"}}` ) ;
13+ } ) ;
14+
Original file line number Diff line number Diff line change 1+ import { module , test } from 'qunit' ;
2+ import { setupRenderingTest } from 'ember-qunit' ;
3+ import { render } from 'ember-test-helpers' ;
4+ import hbs from 'htmlbars-inline-precompile' ;
5+
6+ module ( 'Integration | Component | FooBar' , function ( hooks ) {
7+ setupRenderingTest ( hooks ) ;
8+
9+ hooks . beforeEach ( function ( ) {
10+ this . actions = { } ;
11+ this . send = ( actionName , ...args ) => this . actions [ actionName ] . apply ( this , args ) ;
12+ } ) ;
13+
14+ test ( 'it invokes a sendAction action' , function ( assert ) {
15+ assert . expect ( 1 ) ;
16+
17+ this . actions . test = ( ) => assert . ok ( true ) ;
18+ this . render ( hbs `{{test-component test="test"}}` ) ;
19+ } ) ;
20+ } ) ;
21+
You can’t perform that action at this time.
0 commit comments