mirror of
https://github.com/nextcloud/tasks.git
synced 2025-07-25 01:28:57 +00:00
28 lines
486 B
JavaScript
28 lines
486 B
JavaScript
import { OC } from './OC.js'
|
|
|
|
// eslint-disable-next-line n/no-unpublished-import
|
|
import MockDate from 'mockdate'
|
|
|
|
import { afterAll } from 'vitest'
|
|
|
|
// Set date to fixed value
|
|
MockDate.set(new Date('2019-01-01T12:34:56'))
|
|
|
|
global.OC = new OC()
|
|
|
|
// Mock nextcloud translate functions
|
|
global.t = function(app, string) {
|
|
return string
|
|
}
|
|
|
|
global.n = function(app, singular, plural, count) {
|
|
return singular
|
|
}
|
|
|
|
global.OCA = {}
|
|
global.OCA.Tasks = {}
|
|
|
|
afterAll(() => {
|
|
MockDate.reset()
|
|
})
|