-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests/onAttach, onDomRefresh, onDomRemove, and precompiled template #3533
Tests/onAttach, onDomRefresh, onDomRemove, and precompiled template #3533
Conversation
test/unit/on-attach.spec.js
Outdated
let regionEl; | ||
let region; // A Region to show our View within | ||
|
||
beforeEach(function() { | ||
sinon = this.sinon; | ||
View = Marionette.View.extend(extendAttachMethods(Marionette.View)({ | ||
testView = View.extend(extendAttachMethods(View)({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestView ?
test/unit/on-dom-refresh.spec.js
Outdated
beforeEach(function() { | ||
this.bbView = new this.MnView(); | ||
this.attachedRegion.show(this.bbView); | ||
bbView = new MnView(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the test was already wrong. It should be new BbView
this.View = Backbone.Marionette.View.extend({ | ||
template: _.template(this.template) | ||
template = 'foobar'; | ||
testView = View.extend({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestView
f37d4da
to
b4ed1b7
Compare
test/unit/on-dom-refresh.spec.js
Outdated
@@ -1,61 +1,80 @@ | |||
import _ from 'underscore'; | |||
import Backbone from 'backbone'; | |||
import Marionette from '../../src/backbone.marionette'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be able to remove this import entirely
test/unit/on-dom-remove.spec.js
Outdated
@@ -1,76 +1,95 @@ | |||
import _ from 'underscore'; | |||
import Backbone from 'backbone'; | |||
import Marionette from '../../src/backbone.marionette'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
b4ed1b7
to
c33a923
Compare
test/unit/on-dom-remove.spec.js
Outdated
beforeEach(function() { | ||
this.bbView = new this.MnView(); | ||
this.attachedRegion.show(this.bbView); | ||
bbView = new MnView(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is incorrect. it should be new BbView()
c33a923
to
4e8c983
Compare
…ompiled template unit tests
4e8c983
to
b1885f5
Compare
Proposed changes
Link to the issue: #3248
This pr is a small part of the work to refactor the whole unit tests directory. Merging this issue should keep #3248 open