appium-support
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -61,2 +61,3 @@ /* This library is originated from temp.js at http://github.com/bruce/node-temp */ | ||
exports.open = Q.denodeify(open); | ||
exports.path = generateName; | ||
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "appium", | ||
@@ -10,0 +10,0 @@ "license": "Apache License 2.0", |
@@ -1,2 +0,2 @@ | ||
var tempdir = require('..').tempDir, | ||
var tempDir = require('..').tempDir, | ||
fs = require('fs'), | ||
@@ -8,4 +8,10 @@ chai = require('chai'); | ||
describe('tempdir', function () { | ||
it('should be able to generate a path', function() { | ||
var path = tempDir.path({prefix: 'myfile', suffix: '.tmp'}); | ||
path.should.exists; | ||
path.should.include('myfile.tmp'); | ||
}); | ||
it('should be able to create a temp file', function() { | ||
return tempdir | ||
return tempDir | ||
.open({prefix: 'my-test-file', suffix: '.zip'}) | ||
@@ -15,2 +21,3 @@ .then(function(res) { | ||
res.path.should.exist; | ||
res.path.should.include('my-test-file.zip'); | ||
res.fd.should.exist; | ||
@@ -17,0 +24,0 @@ fs.existsSync(res.path).should.be.ok; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3881
78