Merge pull request #853 from nextcloud/alias

Use alias for jest file resolution
This commit is contained in:
Raimund Schlüßler 2020-02-02 21:38:15 +01:00 committed by GitHub
commit 6ffe1eb8e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 13 deletions

View file

@ -104,7 +104,15 @@
"vue"
],
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/src/$1"
"^@/(.*)$": "<rootDir>/src/$1",
"^Assets/(.*)$": "<rootDir>/src/assets/$1",
"^Components/(.*)$": "<rootDir>/src/components/$1",
"^Directives/(.*)$": "<rootDir>/src/directives/$1",
"^Fonts/(.*)$": "<rootDir>/src/fonts/$1",
"^Mixins/(.*)$": "<rootDir>/src/mixins/$1",
"^Models/(.*)$": "<rootDir>/src/models/$1",
"^Store/(.*)$": "<rootDir>/src/store/$1",
"^Utils/(.*)$": "<rootDir>/src/utils/$1"
},
"testEnvironment": "jest-environment-jsdom-sixteen",
"transform": {

View file

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils'
import General from '../../../../../src/components/TheCollections/General'
import router from '../../../../../src/router'
import General from 'Components/TheCollections/General'
import router from '@/router'
import { store, localVue } from '../../setupStore'

View file

@ -1,6 +1,6 @@
import { mount } from '@vue/test-utils'
import Week from '../../../../../src/components/TheCollections/Week'
import router from '../../../../../src/router'
import Week from 'Components/TheCollections/Week'
import router from '@/router'
import { store, localVue } from '../../setupStore'

View file

@ -1,4 +1,4 @@
import Task from '../../../../src/models/task'
import Task from 'Models/task'
describe('task', () => {
'use strict'

View file

@ -1,11 +1,11 @@
import { createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import calendars, { mapDavCollectionToCalendar } from '../../../src/store/calendars'
import collections from '../../../src/store/collections'
import tasks from '../../../src/store/tasks'
import settings from '../../../src/store/settings'
import Task from '../../../src/models/task'
import calendars, { mapDavCollectionToCalendar } from 'Store/calendars'
import collections from 'Store/collections'
import tasks from 'Store/tasks'
import settings from 'Store/settings'
import Task from 'Models/task'
const localVue = createLocalVue()
localVue.use(Vuex)

View file

@ -1,5 +1,5 @@
import { sort } from '../../../../src/store/storeHelper'
import Task from '../../../../src/models/task'
import { sort } from 'Store/storeHelper'
import Task from 'Models/task'
const vCalendars = [`
BEGIN:VCALENDAR\n