Last active
March 12, 2017 13:10
-
-
Save cibernox/239f153019bf477a6e944451f022678b to your computer and use it in GitHub Desktop.
Demo assert regression
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(){ | |
| this._super(...arguments); | |
| Ember.assert('{{my-component}} must receive a `foo` action', !!this.get('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'; | |
| moduleForComponent('my-component', 'Helps the user with assertions', { | |
| integration: true | |
| }); | |
| test('it doesn\'t if the `foo` property is given', function(assert) { | |
| assert.expect(0); | |
| this.render(hbs`{{my-component foo="something"}}`); | |
| }); | |
| test('it throws if the `foo` property is not given', function(assert) { | |
| assert.expect(1); | |
| assert.throws(function() { | |
| this.render(hbs`{{my-component}}`); | |
| }, /must receive a `foo` action/); | |
| }); |
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.11.1", | |
| "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.11.3", | |
| "ember-data": "2.11.0", | |
| "ember-template-compiler": "2.11.3", | |
| "ember-testing": "2.11.3" | |
| }, | |
| "addons": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment