]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/plugins/plugin-storage.ts
Bumped to version v5.2.1
[github/Chocobozzz/PeerTube.git] / server / tests / plugins / plugin-storage.ts
index 90dafa3e1cecb193d5b8fe8e9a3a69907d456d63..112652a1fe23d3d4825a2ffbd76ad371f0ca1252 100644 (file)
@@ -1,10 +1,8 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
 import { expect } from 'chai'
 import { pathExists, readdir, readFile } from 'fs-extra'
 import { join } from 'path'
-import { HttpStatusCode } from '@shared/models'
 import {
   cleanupTests,
   createSingleServer,
@@ -12,7 +10,8 @@ import {
   PeerTubeServer,
   PluginsCommand,
   setAccessTokensToServers
-} from '@shared/extra-utils'
+} from '@shared/server-commands'
+import { HttpStatusCode } from '@shared/models'
 
 describe('Test plugin storage', function () {
   let server: PeerTubeServer
@@ -27,10 +26,14 @@ describe('Test plugin storage', function () {
   })
 
   describe('DB storage', function () {
-
     it('Should correctly store a subkey', async function () {
       await server.servers.waitUntilLog('superkey stored value is toto')
     })
+
+    it('Should correctly retrieve an array as array from the storage.', async function () {
+      await server.servers.waitUntilLog('storedArrayKey isArray is true')
+      await server.servers.waitUntilLog('storedArrayKey stored value is toto, toto2')
+    })
   })
 
   describe('Disk storage', function () {