Skip to content

Commit

Permalink
test: replace tempy with fs.mkdtemp (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Jan 28, 2020
1 parent d2c7549 commit 7736ee6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@
"eslint-plugin-standard": "^4.0.0",
"nyc": "^15.0.0",
"pkg-up": "^3.0.1",
"sinon": "^8.0.1",
"tempy": "^0.3.0"
"sinon": "^8.0.1"
},
"engines": {
"node": ">= 8.0"
Expand Down
8 changes: 4 additions & 4 deletions test/_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ const bufferEqual = require('buffer-equal')
const common = require('../src/common')
const config = require('./config.json')
const fs = require('fs-extra')
const os = require('os')
const packager = require('..')
const path = require('path')
const plist = require('plist')
const setup = require('./_setup')
const sinon = require('sinon')
const tempy = require('tempy')
const test = require('ava')

const ORIGINAL_CWD = process.cwd()
Expand All @@ -28,9 +28,9 @@ test.after.always(async t => {
await fs.remove(setup.WORK_CWD)
})

test.beforeEach(t => {
t.context.workDir = tempy.directory()
t.context.tempDir = tempy.directory()
test.beforeEach(async t => {
t.context.workDir = await fs.mkdtemp(path.join(os.tmpdir(), 'electron-packager-test-'))
t.context.tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'electron-packager-test-'))
})

test.afterEach.always(async t => {
Expand Down

0 comments on commit 7736ee6

Please sign in to comment.