diff options
Diffstat (limited to 'tests/javascript/unit/setup.spec.ts')
-rw-r--r-- | tests/javascript/unit/setup.spec.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/javascript/unit/setup.spec.ts b/tests/javascript/unit/setup.spec.ts new file mode 100644 index 000000000..510e53baa --- /dev/null +++ b/tests/javascript/unit/setup.spec.ts @@ -0,0 +1,20 @@ +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 + +config.mocks.$n = function(app: any, singular: any) { + return singular +} +config.mocks.n = config.mocks.$n + +afterAll(() => { + // TODO: afterAll tests? +}) |