Created
November 30, 2016 15:12
-
-
Save joeegan/494c8b6672a4669019bb235b7cf7e5cb to your computer and use it in GitHub Desktop.
wait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| init: function(){ | |
| this._super(); | |
| setTimeout(() => { | |
| if (!(this.isDestroyed || this.isDestroying)) { | |
| Ember.run(() => { | |
| this.set('message', 'bar'); | |
| }); | |
| } | |
| }, 100); | |
| }, | |
| message: 'foo', | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Resolver from '../../resolver'; | |
| import config from '../../config/environment'; | |
| const resolver = Resolver.create(); | |
| resolver.namespace = { | |
| modulePrefix: config.modulePrefix, | |
| podModulePrefix: config.podModulePrefix | |
| }; | |
| export default resolver; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { moduleForComponent, test } from 'ember-qunit'; | |
| import hbs from 'htmlbars-inline-precompile'; | |
| import myComponent from '../../../components/my-component'; | |
| import wait from 'ember-test-helpers/wait'; | |
| moduleForComponent('my-component', myComponent, { | |
| integration: true | |
| }); | |
| test('it renders', function(assert) { | |
| this.render(hbs`{{my-component}}`); | |
| assert.equal(this.$().text().trim(), 'foo'); | |
| return wait().then(() => { | |
| assert.equal(this.$().text().trim(), 'bar'); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import resolver from './helpers/resolver'; | |
| import { | |
| setResolver | |
| } from 'ember-qunit'; | |
| setResolver(resolver); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.10.6", | |
| "EmberENV": { | |
| "FEATURES": {} | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": true | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
| "ember": "2.9.0", | |
| "ember-data": "2.9.0", | |
| "ember-template-compiler": "2.9.0", | |
| "ember-testing": "2.9.0" | |
| }, | |
| "addons": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment