From 77017c2cd3dcb202bf2e14a722fea90ab522bb3a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 1 Jul 2013 12:59:31 -0700 Subject: [PATCH] Compare against realpath of HOME --- spec/stdlib/fs-utils-spec.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/stdlib/fs-utils-spec.coffee b/spec/stdlib/fs-utils-spec.coffee index 4a7578063..3031af662 100644 --- a/spec/stdlib/fs-utils-spec.coffee +++ b/spec/stdlib/fs-utils-spec.coffee @@ -1,4 +1,5 @@ fsUtils = require 'fs-utils' +fs = require 'fs' path = require 'path' describe "fsUtils", -> @@ -127,6 +128,6 @@ describe "fsUtils", -> describe ".absolute(relativePath)", -> it "converts a leading ~ segment to the HOME directory", -> - expect(fsUtils.absolute('~')).toBe process.env.HOME - expect(fsUtils.absolute(path.join('~', 'a'))).toBe path.join(process.env.HOME, 'a') + expect(fsUtils.absolute('~')).toBe fs.realpathSync(process.env.HOME) + expect(fsUtils.absolute(path.join('~', 'a'))).toBe path.join(fs.realpathSync(process.env.HOME), 'a') expect(fsUtils.absolute('~test')).toBe '~test'