Last active
December 11, 2020 19:55
-
-
Save robbiespeed/6347b4c5006de13d33f73aa5cbca8d7d to your computer and use it in GitHub Desktop.
Ember Test
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'; | |
const { get, set, computed } = Ember; | |
export default Ember.Controller.extend({ | |
isButtonOn: false, | |
// This toggle will run when the button is pressed, it should toggle the isButtonOn property | |
// which should trigger the value of text to recompute | |
// -- begin edit area | |
toggle () { | |
}, | |
text: computed(function () { | |
// -- end edit area | |
return get(this, 'isButtonOn') ? | |
'Congrats you\'ve fixed it and turned on the button' : | |
'You must fix controllers/application.js and press the button'; | |
}), | |
}); |
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.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.16.2", | |
"ember-template-compiler": "2.16.2", | |
"ember-testing": "2.16.2" | |
}, | |
"addons": { | |
"ember-data": "2.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment