Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('test init class TabsMessage', () => {
const msg = {
type: uuid(),
payload: {
random: uuid()
}
}
const message = new TabsMessage(msg)
expect(message).toBeTruthy()
expect(message.send).toBeTruthy()
expect(message.type).toEqual(msg.type)
expect(message.payload).toEqual(msg.payload)
})
it('test init class SecureMessage', () => {
const msg = {
type: uuid(),
payload: {
random: uuid()
}
}
const message = new SecureMessage(msg)
expect(message).toBeTruthy()
expect(message.send).toBeTruthy()
expect(message.type).toEqual(msg.type)
expect(message.payload).toEqual(msg.payload)
})
* Modified By: the developer formerly known as Rinat(lich666dead) at
* -----
* Copyright (c) 2019 ZilPay
*/
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Input, { INPUT_TYPES } from 'src/components/Input.vue'
import { uuid } from 'uuidv4'
import {
BEM_CONFIG,
SIZE_VARIANS
} from 'src/config'
const localVue = createLocalVue()
const TEST_TITLE = uuid()
const TEST_ERROR = uuid()
const TEST_VALUE = uuid()
const TEST_PLACEHOLDER = uuid()
localVue.use(vueBemCn, { delimiters: BEM_CONFIG })
describe('components:Input', () => {
const wrapper = shallowMount(Input, {
localVue,
propsData: {
size: SIZE_VARIANS.md,
disabled: false,
round: true,
block: true,
type: INPUT_TYPES.number,
min: 10,
max: 20,
* -----
* Copyright (c) 2019 ZilPay
*/
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Input, { INPUT_TYPES } from 'src/components/Input.vue'
import { uuid } from 'uuidv4'
import {
BEM_CONFIG,
SIZE_VARIANS
} from 'src/config'
const localVue = createLocalVue()
const TEST_TITLE = uuid()
const TEST_ERROR = uuid()
const TEST_VALUE = uuid()
const TEST_PLACEHOLDER = uuid()
localVue.use(vueBemCn, { delimiters: BEM_CONFIG })
describe('components:Input', () => {
const wrapper = shallowMount(Input, {
localVue,
propsData: {
size: SIZE_VARIANS.md,
disabled: false,
round: true,
block: true,
type: INPUT_TYPES.number,
min: 10,
max: 20,
step: 1,
* -----
* Modified By: the developer formerly known as Rinat(lich666dead) at
* -----
* Copyright (c) 2019 ZilPay
*/
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Input, { INPUT_TYPES } from 'src/components/Input.vue'
import { uuid } from 'uuidv4'
import {
BEM_CONFIG,
SIZE_VARIANS
} from 'src/config'
const localVue = createLocalVue()
const TEST_TITLE = uuid()
const TEST_ERROR = uuid()
const TEST_VALUE = uuid()
const TEST_PLACEHOLDER = uuid()
localVue.use(vueBemCn, { delimiters: BEM_CONFIG })
describe('components:Input', () => {
const wrapper = shallowMount(Input, {
localVue,
propsData: {
size: SIZE_VARIANS.md,
disabled: false,
round: true,
block: true,
type: INPUT_TYPES.number,
min: 10,
* -----
* Modified By: the developer formerly known as Rinat(lich666dead) at
* -----
* Copyright (c) 2019 ZilPay
*/
import { shallowMount, createLocalVue } from '@vue/test-utils'
import vueBemCn from 'vue-bem-cn'
import Button from 'src/components/Button.vue'
import {
BEM_CONFIG,
SIZE_VARIANS,
COLOR_VARIANTS
} from 'src/config'
import { uuid } from 'uuidv4'
const TEST_TEXT = uuid()
const localVue = createLocalVue()
localVue.use(vueBemCn, { delimiters: BEM_CONFIG })
describe('components:Button', () => {
const wrapper = shallowMount(Button, {
localVue,
propsData: {
size: SIZE_VARIANS.md,
color: COLOR_VARIANTS.info,
disabled: false,
round: true,
block: true
},
slots: {
default: [TEST_TEXT]
COLOR_VARIANTS,
SIZE_VARIANS,
BEM_CONFIG
} from 'src/config'
const localVue = createLocalVue()
const TEST = [
{
value: 'Send',
event: 'send',
icon: ICON_VARIANTS.add,
iconType: ICON_TYPE.svg,
variant: COLOR_VARIANTS.primary,
size: SIZE_VARIANS.sm,
uuid: uuid()
},
{
value: 'Receive',
event: 'receive',
icon: ICON_VARIANTS.add,
iconType: ICON_TYPE.svg,
variant: COLOR_VARIANTS.primary,
size: SIZE_VARIANS.sm,
uuid: uuid()
}
]
localVue.use(vueBemCn, { delimiters: BEM_CONFIG })
describe('components:BottomBar', () => {
const wrapper = shallowMount(BottomBar, {
function metric(title: string, ql: string, span: number = 24, unit: UnitEnum = UnitEnum.None, chartType: string = "line"): Metric {
return {
span,
id: uuid(),
chart: { unit, title, target: { ql, db: '_internal' }, type: chartType },
}
}
function metric(title: string, ql: string, span: number = 24, unit: UnitEnum = UnitEnum.None): Metric {
return {
span,
id: uuid(),
chart: { unit, title, target: { ql, db: '_internal' } },
}
}
icon: {
name: ICON_VARIANTS.zilliqaLogo,
width: '38',
height: '51'
},
title: 'Transfer ZIL.',
text: 'The easiest way to get ZIL is to simply transfer it from another address.',
button: 'SHOW ADDRESS',
uuid: uuid()
},
{
icon: false,
title: 'Buy ZIL on CoinSwitch.',
text: 'CoinSwitch is the one-stop destination to exchange more than 300 cryptocurrencies at the best rate.',
button: 'BUY ZIL',
uuid: uuid()
}
]
export default {
name: 'Receive',
components: {
TopBar,
Alert,
Title,
P,
Icon,
Button,
Container,
Separator
},
data() {