Skip to content

Commit

Permalink
tests: Use home directory
Browse files Browse the repository at this point in the history
This ensures the target is existing directory and that it is on
a file system, which is native to the underlying operation system.
E.g. when trying to read a directory as a file on NFS on Windows
(can happen easily in VirtualBox, for instance), the operation
won't throw an exception, but will read an empty string.
  • Loading branch information
honzajavorek committed Feb 10, 2017
1 parent c418afb commit 86b17af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/integration/cli/api-description-cli-test.coffee
@@ -1,5 +1,6 @@

fs = require 'fs'
os = require 'os'
{assert} = require 'chai'

{execDredd, startServer} = require './helpers'
Expand Down Expand Up @@ -77,7 +78,7 @@ describe 'CLI - API Description Document', ->
describe 'When given path exists, but can\'t be read', ->
dreddCommand = undefined
args = [
'./test/fixtures/'
os.homedir(),
"http://localhost:#{PORT}"
]

Expand Down

0 comments on commit 86b17af

Please sign in to comment.