blob: 8db303fd86f1f558b3ecd101ac72796558b29aaa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { expect } from 'chai'
import { readdir } from 'fs-extra'
import { PeerTubeServer } from '@shared/server-commands'
async function checkPlaylistFilesWereRemoved (
playlistUUID: string,
server: PeerTubeServer,
directories = [ 'thumbnails' ]
) {
for (const directory of directories) {
const directoryPath = server.getDirectoryPath(directory)
const files = await readdir(directoryPath)
for (const file of files) {
expect(file).to.not.contain(playlistUUID)
}
}
}
export {
checkPlaylistFilesWereRemoved
}
|