mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
Merge pull request #2027 from resin-io/remove-tmp
refactor(test): Remove dependency on `tmp`
This commit is contained in:
commit
56b0f13525
5
npm-shrinkwrap.json
generated
5
npm-shrinkwrap.json
generated
@ -6115,11 +6115,6 @@
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz"
|
||||
},
|
||||
"tmp": {
|
||||
"version": "0.0.31",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz",
|
||||
"dev": true
|
||||
},
|
||||
"to-file": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/to-file/-/to-file-0.2.0.tgz",
|
||||
|
@ -116,7 +116,6 @@
|
||||
"pkg": "4.1.1",
|
||||
"sass-lint": "1.10.2",
|
||||
"spectron": "3.7.2",
|
||||
"tmp": "0.0.31",
|
||||
"versionist": "2.8.1"
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,8 @@ const _ = require('lodash')
|
||||
const Bluebird = require('bluebird')
|
||||
const fileExists = require('file-exists')
|
||||
const fs = Bluebird.promisifyAll(require('fs'))
|
||||
const tmp = require('tmp')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const imageStream = require('../../lib/image-stream/index')
|
||||
|
||||
const doFilesContainTheSameData = (file1, file2) => {
|
||||
@ -61,7 +62,7 @@ exports.expectError = function (file, errorMessage, errorDetail) {
|
||||
|
||||
exports.extractFromFilePath = function (file, image) {
|
||||
it('should be able to extract the image', function () {
|
||||
const output = tmp.tmpNameSync()
|
||||
const output = path.join(os.tmpdir(), path.basename(file))
|
||||
|
||||
return imageStream.getFromFilePath(file).then(function (results) {
|
||||
m.chai.expect(results.path).to.equal(file)
|
||||
|
Loading…
x
Reference in New Issue
Block a user