Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('Trackers', () => {
let wrapper;
const localVue = createLocalVue();
localVue.directive('tooltip', () => {});
const $store = new Store({
getters: {
'trackers/all': [
{
id: 1,
process: 'Firefox',
project: {
name: 'Developments',
color: '#ccc'
}
}
]
}
});
const $electron = {
ipcRenderer: {
send: jest.fn()
describe('Activity', () => {
let wrapper;
const $store = new Store({});
const $electron = {
ipcRenderer: {
send: jest.fn()
}
};
const factory = () =>
shallowMount(Activity, {
propsData: {
id: 1,
description: 'Review',
startedAt: '2019-01-31T01:23:45',
stoppedAt: '2019-02-01T01:23:45',
project: {
id: 2
}
describe('PowerMonitor', () => {
let wrapper;
const $store = new Store({
getters: {
'activities/stopOnShutdown': false,
'activities/stopOnSuspend': false
}
});
const factory = () =>
shallowMount(PowerMonitor, {
mocks: {
$store
}
});
describe('when click suspend-checkbox', () => {
beforeEach(() => {
wrapper = factory();
describe('Auth', () => {
let wrapper;
const $store = new Store({});
const $electron = {
ipcRenderer: {
send: jest.fn(),
on: () => {}
}
};
const factory = () =>
shallowMount(Auth, {
mocks: {
$store,
$electron
}
});
describe('when click submit-button', () => {
describe('BigTimer', () => {
let wrapper;
MockDate.set('2019-01-31T01:23:45');
const localVue = createLocalVue();
localVue.directive('tooltip', () => {});
const $store = new Store({
getters: {
'activities/working': [],
'suggestions/all': [
{
project: {
id: 2,
name: 'Review',
color: '#ff0'
},
description: 'Review my tasks'
}
]
}
});
const factory = () =>
describe('TrackerEditor', () => {
let wrapper;
const $store = new Store({
getters: {
'processes/all': []
}
});
const closeWindow = jest.fn();
const $electron = {
remote: {
getCurrentWindow: () => ({
close: closeWindow
})
}
};
const factory = () =>
shallowMount(TrackerEditor, {
describe('ActivityEditor', () => {
let wrapper;
const $store = new Store({});
const closeWindow = jest.fn();
const $electron = {
remote: {
getCurrentWindow: () => ({
close: closeWindow
})
}
};
const factory = () =>
shallowMount(ActivityEditor, {
mocks: {
$store,
$electron,
$route: { query: {} }
}
describe('ProjectSelect', () => {
let wrapper;
const $store = new Store({
getters: {
'projects/getProjects': [
{
id: 1,
name: 'Development',
color: '#ccc'
}
]
}
});
const factory = () =>
shallowMount(ProjectSelect, {
mocks: {
$store
}
describe('Index', () => {
let wrapper;
const localVue = createLocalVue();
localVue.directive('tooltip', () => {});
const $store = new Store({
getters: {
'activities/workings': [
{
id: 1,
project: { id: 2 },
description: 'Review',
startedAt: '2019-01-01T01:23:45'
}
],
'auth/webUrl': 'http://app.hackaru.app'
}
});
const $electron = {
ipcRenderer: {
send: jest.fn()
describe('Toast', () => {
let wrapper;
jest.useFakeTimers();
const $store = new Store({
getters: {
'toast/message': {
text: 'message',
type: 'success',
rand: 12345,
duration: 500
}
}
});
const $electron = {
remote: {
getCurrentWindow: () => ({
isVisible: () => true
})
}