aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-unloading
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-unloading')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-unloading/lib.js2
-rw-r--r--server/tests/fixtures/peertube-plugin-test-unloading/main.js14
-rw-r--r--server/tests/fixtures/peertube-plugin-test-unloading/package.json20
3 files changed, 36 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-unloading/lib.js b/server/tests/fixtures/peertube-plugin-test-unloading/lib.js
new file mode 100644
index 000000000..f57e7cb01
--- /dev/null
+++ b/server/tests/fixtures/peertube-plugin-test-unloading/lib.js
@@ -0,0 +1,2 @@
1const d = new Date()
2exports.value = d.getTime()
diff --git a/server/tests/fixtures/peertube-plugin-test-unloading/main.js b/server/tests/fixtures/peertube-plugin-test-unloading/main.js
new file mode 100644
index 000000000..5c8457cef
--- /dev/null
+++ b/server/tests/fixtures/peertube-plugin-test-unloading/main.js
@@ -0,0 +1,14 @@
1const lib = require('./lib')
2
3async function register ({ getRouter }) {
4 const router = getRouter()
5 router.get('/get', (req, res) => res.json({ message: lib.value }))
6}
7
8async function unregister () {
9}
10
11module.exports = {
12 register,
13 unregister
14}
diff --git a/server/tests/fixtures/peertube-plugin-test-unloading/package.json b/server/tests/fixtures/peertube-plugin-test-unloading/package.json
new file mode 100644
index 000000000..7076d4b6f
--- /dev/null
+++ b/server/tests/fixtures/peertube-plugin-test-unloading/package.json
@@ -0,0 +1,20 @@
1{
2 "name": "peertube-plugin-test-unloading",
3 "version": "0.0.1",
4 "description": "Plugin test (modules unloading)",
5 "engine": {
6 "peertube": ">=1.3.0"
7 },
8 "keywords": [
9 "peertube",
10 "plugin"
11 ],
12 "homepage": "https://github.com/Chocobozzz/PeerTube",
13 "author": "Chocobozzz",
14 "bugs": "https://github.com/Chocobozzz/PeerTube/issues",
15 "library": "./main.js",
16 "staticDirs": {},
17 "css": [],
18 "clientScripts": [],
19 "translations": {}
20}