Last active
March 4, 2020 16:21
-
-
Save Gaurav0/b541d702f9ba8162dc6d4512c058d769 to your computer and use it in GitHub Desktop.
New Twiddle
This file contains 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({ | |
}); |
This file contains 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 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 { module, test } from 'qunit'; | |
import { visit, currentURL } from '@ember/test-helpers'; | |
import { setupApplicationTest } from 'ember-qunit'; | |
module('TODO: put something here', function(hooks) { | |
setupApplicationTest(hooks); | |
test('visiting /', async function(assert) { | |
await visit('/'); | |
assert.equal(currentURL(), '/'); | |
}); | |
}); |
This file contains 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 { module, test } from 'qunit'; | |
import { setupRenderingTest } from 'ember-qunit'; | |
import { render } from '@ember/test-helpers'; | |
import hbs from 'htmlbars-inline-precompile'; | |
module('TODO: put something here', function(hooks) { | |
setupRenderingTest(hooks); | |
test('it renders', async function(assert) { | |
// Set any properties with this.set('myProperty', 'value'); | |
// Handle any actions with this.set('myAction', function(val) { ... }); | |
await render(hbs`<MyComponent />`); | |
assert.equal(this.element.textContent.trim(), ''); | |
// Template block usage: | |
await render(hbs` | |
<MyComponent> | |
template block text | |
</MyComponent> | |
`); | |
assert.equal(this.element.textContent.trim(), 'template block text'); | |
}); | |
}); |
This file contains 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 Application from '../app'; | |
import config from '../config/environment'; | |
import { setApplication } from '@ember/test-helpers'; | |
import { assign } from '@ember/polyfills'; | |
import { start } from 'ember-qunit'; | |
let attributes = { | |
rootElement: '#test-root', | |
autoboot: false | |
}; | |
attributes = assign(attributes, config.APP); | |
let application = Application.create(attributes); | |
setApplication(application); | |
start(); |
This file contains 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.17.0", | |
"EmberENV": { | |
"FEATURES": {}, | |
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false, | |
"_APPLICATION_TEMPLATE_WRAPPER": true, | |
"_JQUERY_INTEGRATION": true | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": true | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.14.3", | |
"ember-template-compiler": "3.14.3", | |
"ember-testing": "3.14.3" | |
}, | |
"addons": { | |
"ember-data": "3.14.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment