import { getDestination } from './buckets'; describe('resize_image/buckets', () => { describe('getDestination', () => { it.each` filePath | expected ${'uploads/2f250927455d/minify/minify/minify/3ec4314221577d915a77adbf0decb269.png'} | ${'uploads/2f250927455d/3ec4314221577d915a77adbf0decb269.png'} ${'uploads/2f250927455d/minify/3ec4314221577d915a77adbf0decb269.png'} | ${'uploads/2f250927455d/3ec4314221577d915a77adbf0decb269.png'} ${'uploads/2f250927455d/3ec4314221577d915a77adbf0decb269.png'} | ${'uploads/2f250927455d/3ec4314221577d915a77adbf0decb269.png'} `('should remove minify from the file path', ({ filePath, expected }) => { expect(getDestination(filePath)).toBe(expected); }); }); });