Skip to content

Instantly share code, notes, and snippets.

@xomaczar
Last active July 24, 2018 14:34
Show Gist options
  • Save xomaczar/92a34818d015e9b0da701a3c1a9b371e to your computer and use it in GitHub Desktop.
Save xomaczar/92a34818d015e9b0da701a3c1a9b371e to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
import EmberArray from 'ember/array';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this.super(...arguments);
this.simpleTypeSetA = EmberArray();
},
actions: {
addSetA() {
}
}
});
<h1>Testing setDiff</h1>
<label>SET A</label><br>
<input id="main-input" value={{valueOne}} oninput={{action (mut valueOne) value='target.value'}}>
<br>
import { run } from '@ember/runloop';
export default function destroyApp(application) {
run(application, 'destroy');
}
import Resolver from '../../resolver';
import config from '../../config/environment';
const resolver = Resolver.create();
resolver.namespace = {
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix
};
export default resolver;
import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
const { run } = Ember;
const assign = Ember.assign || Ember.merge;
export default function startApp(attrs) {
let application;
let attributes = assign({rootElement: "#test-root"}, config.APP);
attributes = assign(attributes, attrs); // use defaults, but you can override;
run(() => {
application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
});
return application;
}
import resolver from './helpers/resolver';
import {
setResolver
} from 'ember-qunit';
import { start } from 'ember-cli-qunit';
setResolver(resolver);
start();
{
"version": "0.15.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.2.2",
"ember-template-compiler": "3.2.2",
"ember-testing": "3.2.2"
},
"addons": {
"ember-data": "3.2.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment