Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit ea53bb3

Browse files
rvaggvmx
authored andcommitted
fix: minor improvement to path handling in Node.js tests
1 parent 7cacff7 commit ea53bb3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/node.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/* eslint-env mocha */
22
'use strict'
33

4+
const path = require('path')
45
const fs = require('fs-extra')
56
const IPFSRepo = require('ipfs-repo')
67
const os = require('os')
78

89
describe('Node.js', () => {
9-
const repoExample = process.cwd() + '/test/example-repo'
10-
const repoTests = os.tmpdir() + '/t-r-' + Date.now()
10+
const repoExample = path.join(process.cwd(), 'test/example-repo')
11+
const repoTests = fs.mkdtempSync(path.join(os.tmpdir(), 'js-ipld-'))
1112
const repo = new IPFSRepo(repoTests)
1213

1314
before(async () => {

0 commit comments

Comments
 (0)