summaryrefslogtreecommitdiffstats
path: root/tests/javascript/unit/setup.ts
blob: d6f38128b65a325d10740eefbd0712da35e2fbe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { config } from '@vue/test-utils'

// Note: This was copied from nextcloud/tasks repo
import { OC } from './OC'
(global as any).OC = new OC()

// Mock nextcloud translate functions
config.mocks.$t = function(_app: any, string: any) {
	return string
}
config.mocks.t = config.mocks.$t
global.t = config.mocks.$t

config.mocks.$n = function(app: any, singular: any) {
	return singular
}
config.mocks.n = config.mocks.$n

afterAll(() => {
	// TODO: afterAll tests?
})