Github user robertkowalski commented on a diff in the pull request:
https://github.com/apache/couchdb-fauxton/pull/204#discussion_r22274200
--- Diff: app/addons/documents/views-doceditor.js ---
@@ -207,184 +205,95 @@ function (app, FauxtonAPI, Components, Documents,
Databases, prettify) {
'click button.delete': 'destroy',
'click button.duplicate': 'duplicate',
'click button.upload': 'upload',
- 'click button.js-back': 'goback',
- 'click button.string-edit': 'stringEditing'
+ 'click a.js-back': 'onClickGoBack'
},
disableLoader: true,
initialize: function (options) {
this.database = options.database;
- _.bindAll(this);
- },
- goback: function () {
- var lastPages = FauxtonAPI.router.lastPages;
+ // to allow dependency injection
+ this.components = _.extend({
--- End diff --
I see the good intention, but I don't get why we write code that _maybe
could_ be tested, that is more complex without writing tests for it.
I could also say, playing the devils advocate: additionally we don't have
any test included that confirms that this makes the view easier to test.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---