aboutsummaryrefslogtreecommitdiffstats
path: root/__mocks__
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-06-14 10:49:40 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-06-21 09:08:04 +0200
commitf8e697ce4dd28ba8899adacf2fa12e33f60b2194 (patch)
tree98951ba5640964212ec4350170a38cb83358a951 /__mocks__
parent8b5ef98495597c11caba2ac1fea0416345ec2f0e (diff)
downloadnextcloud-server-f8e697ce4dd28ba8899adacf2fa12e33f60b2194.tar.gz
nextcloud-server-f8e697ce4dd28ba8899adacf2fa12e33f60b2194.zip
feat: prepare jest upgrade and ts testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to '__mocks__')
-rw-r--r--__mocks__/@nextcloud/auth.js15
-rw-r--r--__mocks__/svg.js1
2 files changed, 16 insertions, 0 deletions
diff --git a/__mocks__/@nextcloud/auth.js b/__mocks__/@nextcloud/auth.js
new file mode 100644
index 00000000000..ba0ae211790
--- /dev/null
+++ b/__mocks__/@nextcloud/auth.js
@@ -0,0 +1,15 @@
+import { c } from "tar"
+
+export const getCurrentUser = function() {
+ return {
+ uid: 'test',
+ displayName: 'Test',
+ isAdmin: false,
+ }
+}
+
+export const getRequestToken = function() {
+ return 'test-token-1234'
+}
+
+export const onRequestTokenUpdate = function() {}
diff --git a/__mocks__/svg.js b/__mocks__/svg.js
new file mode 100644
index 00000000000..7e40e291e33
--- /dev/null
+++ b/__mocks__/svg.js
@@ -0,0 +1 @@
+module.exports = 'SvgMock'