Created
October 7, 2017 14:40
-
-
Save bmfteixeira/7d47e391a7a497d635a9daba1e767c48 to your computer and use it in GitHub Desktop.
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
describe('Computed component', () => { | |
let props | |
beforeEach(() => { | |
props = { | |
plan: 'pro' | |
} | |
}) | |
describe('Computed', () => { | |
it('themeDiv', done => { | |
const wrapper = shallow(ComputedComponent, { | |
propsData: props | |
}) | |
expect(wrapper.vm.themeDiv).to.equal('blue') | |
wrapper.setProps({ | |
theme: 'trial' | |
}) | |
expect(wrapper.vm.themeDiv).to.equal('soft-blue') | |
wrapper.setProps({ | |
theme: 'standard' | |
}) | |
expect(wrapper.vm.themeDiv).to.equal('orange') | |
done() | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment