From ea53bb31189e530a17d8e5b2e462863c8dfee4e6 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 17 Jan 2020 15:13:39 +1100 Subject: [PATCH] fix: minor improvement to path handling in Node.js tests --- test/node.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/node.js b/test/node.js index f09fb07..6f5e11e 100644 --- a/test/node.js +++ b/test/node.js @@ -1,13 +1,14 @@ /* eslint-env mocha */ 'use strict' +const path = require('path') const fs = require('fs-extra') const IPFSRepo = require('ipfs-repo') const os = require('os') describe('Node.js', () => { - const repoExample = process.cwd() + '/test/example-repo' - const repoTests = os.tmpdir() + '/t-r-' + Date.now() + const repoExample = path.join(process.cwd(), 'test/example-repo') + const repoTests = fs.mkdtempSync(path.join(os.tmpdir(), 'js-ipld-')) const repo = new IPFSRepo(repoTests) before(async () => {