import 'mocha'
import { expect } from 'chai'
-import { MockJoinPeerTubeVersions } from '@shared/extra-utils/mock-servers/joinpeertube-versions'
+import { MockJoinPeerTubeVersions } from '@shared/extra-utils'
+import { PluginType } from '@shared/models'
import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils'
import { ServerInfo } from '../../../../shared/extra-utils/index'
-import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
import {
CheckerBaseParams,
checkNewPeerTubeVersion,
prepareNotificationsTest
} from '../../../../shared/extra-utils/users/user-notifications'
import { UserNotification, UserNotificationType } from '../../../../shared/models/users'
-import { PluginType } from '@shared/models'
describe('Test admin notifications', function () {
let server: ServerInfo
before(async function () {
this.timeout(120000)
+ joinPeerTubeServer = new MockJoinPeerTubeVersions()
+ const port = await joinPeerTubeServer.initialize()
+
const config = {
peertube: {
check_latest_version: {
enabled: true,
- url: 'http://localhost:42102/versions.json'
+ url: `http://localhost:${port}/versions.json`
}
},
plugins: {
accessToken: server.accessToken,
npmName: 'peertube-theme-background-red'
})
-
- joinPeerTubeServer = new MockJoinPeerTubeVersions()
- await joinPeerTubeServer.initialize()
})
describe('Latest PeerTube version notification', function () {