1 import { expect } from 'chai'
2 import { readdir } from 'fs-extra'
3 import { PeerTubeServer } from '@shared/server-commands'
5 async function checkPlaylistFilesWereRemoved (
7 server: PeerTubeServer,
8 directories = [ 'thumbnails' ]
10 for (const directory of directories) {
11 const directoryPath = server.getDirectoryPath(directory)
13 const files = await readdir(directoryPath)
14 for (const file of files) {
15 expect(file).to.not.contain(playlistUUID)
21 checkPlaylistFilesWereRemoved