test(mapper): fix unit test that relied on a folder called “tmp” to already exist

pull/110/head
Romain 6 years ago
parent fc4432ba34
commit 899a89e516

@ -52,10 +52,10 @@ describe('Album mapper', function () {
it('with a path relative to the current directory', () => {
const absolutePath = createTmpFile({
dir: `${process.cwd()}/tmp`,
dir: process.cwd(),
contents: "module.exports = file => ['my-album']"
})
const relative = path.relative(process.cwd(), absolutePath)
const relative = path.basename(absolutePath)
const mapper = new AlbumMapper([`file://${relative}`])
should(mapper.getAlbums(TEST_FILE)).eql(['my-album'])
})

Loading…
Cancel
Save