Skip to content

Commit

Permalink
test: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyerburgh committed May 10, 2018
1 parent 007e765 commit 6aa99a1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
28 changes: 14 additions & 14 deletions test/specs/config.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import {
describeWithShallowAndMount,
itDoNotRunIf,
itSkipIf,
Expand Down Expand Up @@ -134,21 +134,21 @@ describeWithShallowAndMount('config', (mountingMethod) => {
expect(wrapper.contains(TransitionGroupStub)).to.equal(false)
expect(wrapper.contains(TransitionStub)).to.equal(false)
})

itSkipIf(
vueVersion < 2.3,
'does not log when component is extended if logModifiedComponents is false', () => {
const ChildComponent = Vue.extend({
template: '<span />'
})
const TestComponent = {
template: '<child-component />',
components: {
ChildComponent
const ChildComponent = Vue.extend({
template: '<span />'
})
const TestComponent = {
template: '<child-component />',
components: {
ChildComponent
}
}
}
config.logModifiedComponents = false
mountingMethod(TestComponent)
expect(consoleError.called).to.equal(false)
})
config.logModifiedComponents = false
mountingMethod(TestComponent)
expect(consoleError.called).to.equal(false)
})
})
56 changes: 28 additions & 28 deletions test/specs/mounting-options/localVue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,36 @@ describeWithMountingMethods('options.localVue', (mountingMethod) => {
itSkipIf(
vueVersion < 2.3,
'works correctly with extended children', () => {
const localVue = createLocalVue()
localVue.use(Vuex)
const store = new Vuex.Store({
state: { val: 2 }
})
const ChildComponent = Vue.extend({
template: '<span>{{val}}</span>',
computed: {
val () {
return this.$store.state.val
const localVue = createLocalVue()
localVue.use(Vuex)
const store = new Vuex.Store({
state: { val: 2 }
})
const ChildComponent = Vue.extend({
template: '<span>{{val}}</span>',
computed: {
val () {
return this.$store.state.val
}
}
})
const TestComponent = {
template: '<div><child-component /></div>',
components: {
ChildComponent
}
}
})
const TestComponent = {
template: '<div><child-component /></div>',
components: {
ChildComponent
const wrapper = mountingMethod(TestComponent, {
localVue,
store
})
const HTML = mountingMethod.name === 'renderToString'
? wrapper
: wrapper.html()
if (mountingMethod.name === 'shallowMount') {
expect(HTML).to.not.contain('2')
} else {
expect(HTML).to.contain('2')
}
}
const wrapper = mountingMethod(TestComponent, {
localVue,
store
})
const HTML = mountingMethod.name === 'renderToString'
? wrapper
: wrapper.html()
if (mountingMethod.name === 'shallowMount') {
expect(HTML).to.not.contain('2')
} else {
expect(HTML).to.contain('2')
}
})
})

0 comments on commit 6aa99a1

Please sign in to comment.