This file contains hidden or 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 Obj from '../Obj.vue' | |
describe('Obj', () => { | |
describe('Lifecycle', () => { | |
it('created', done => { | |
const context = { | |
getInitialConfig: () => {} | |
} | |
const getInitialConfigSpy = sinon.spy(context, 'getInitialConfigSpy') |
This file contains hidden or 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
<template> | |
<div> | |
Lifecycle using object example | |
</div> | |
</template> | |
<script> | |
import { mapActions } from 'vuex' | |
import { actionTypes } from 'services/constants' |
This file contains hidden or 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
// Working with the object here! | |
import Probability from '../probability.vue' | |
describe('Probability component', () => { | |
describe('Computed ', () => { | |
it('getClasses', done => { | |
const context = { | |
classModifiers: ['medium', 'blue-theme', 'rounded-corners'] | |
} | |
This file contains hidden or 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
<template> | |
<div :class="getClasses"> | |
Another component, another test, random probability | |
</div> | |
</template> | |
<script> | |
export default { | |
props: { | |
classModifiers: { |
This file contains hidden or 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', () => { |
This file contains hidden or 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
<template> | |
<div :class="themeDiv"></div> | |
</template> | |
<script type="text/javascript"> | |
export default { | |
props: { | |
plan: { | |
required: true, | |
type: String |
This file contains hidden or 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('Watcher component', () => { | |
let props | |
beforeEach(() => { | |
props = { | |
propId: 1 | |
} | |
}) | |
describe('Watcher', () => { |
This file contains hidden or 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
<template> | |
<div></div> | |
</template> | |
<script type="text/javascript"> | |
export default { | |
props: { | |
propId: { | |
type: Number, | |
required: true |
This file contains hidden or 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 { GET_OBJECTS } from 'services/constants/action-types' | |
describe('Objects component', () => { | |
let store | |
let state | |
let actions | |
beforeEach(() => { | |
actions = {} | |
actions[GET_OBJECTS] = sinon.stub() |
This file contains hidden or 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
<template> | |
<div></div> | |
</template> | |
<script type="text/javascript"> | |
import { GET_OBJECTS } from 'services/constants/action-types' | |
export default { | |
... | |
data () { |
NewerOlder