Skip to content

Commit

Permalink
Merge pull request #3812 from BacLuc/frontend-fix-vitest-warnings
Browse files Browse the repository at this point in the history
Frontend: fix vitest warnings
  • Loading branch information
usu authored Sep 23, 2023
2 parents 8ff80dd + 9dc24a2 commit f90e05d
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions frontend/src/views/camp/__tests__/Dashboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ const AUTH = {
function createCampWithRole(role) {
return () => ({
campCollaborations: () => ({
_meta: {
self: '/campCollaborations?camp=%2Fapi%2Fcamps%2F6973c230d6b1',
load: Promise.resolve({
allItems: [],
}),
loading: false,
},
items: [
{
role: role,
Expand All @@ -46,6 +53,42 @@ function createCampWithRole(role) {
},
],
}),
categories: () => ({
_meta: {
self: '/categories?camp=%2Fapi%2Fcamps%2F6973c230d6b1',
load: Promise.resolve({
allItems: [],
}),
loading: false,
},
}),
periods: () => ({
_meta: {
self: '/periods?camp=%2Fapi%2Fcamps%2F6973c230d6b1',
load: Promise.resolve({
allItems: [],
}),
loading: false,
},
}),
progressLabels: () => ({
_meta: {
self: '/progressLabels?camp=%2Fapi%2Fcamps%2F6973c230d6b1',
load: Promise.resolve({
allItems: [],
}),
loading: false,
},
}),
activities: () => ({
_meta: {
self: '/activities?camp=%2Fapi%2Fcamps%2F6973c230d6b1',
load: Promise.resolve({
allItems: [],
}),
loading: false,
},
}),
})
}

Expand All @@ -58,11 +101,10 @@ const DEFAULT_DASHBOARD_OPTIONS = () => ({
$auth: AUTH,
$route: ROUTE(),
$router: ROUTER(),
$tc: () => {},
$tc: () => '',
api: { reload: () => Promise.resolve() },
},
data: () => ({
loggedInUser: USER,
loading: false,
filter: {
period: null,
Expand Down

0 comments on commit f90e05d

Please sign in to comment.