From f58661273b358aed2bd0655e4f54834f11448901 Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Mon, 2 Mar 2015 11:07:25 -0500 Subject: [PATCH] Fixed path tests in Windows Fixes https://github.com/jonschlinkert/relative/issues/4 --- test/path.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/path.js b/test/path.js index fc5cd6af..ea6bb6b1 100644 --- a/test/path.js +++ b/test/path.js @@ -1,9 +1,12 @@ 'use strict'; +var path = require('path'); var should = require('should'); var Handlebars = require('handlebars'); var helpers = require('..'); +var upPath = '..' + path.sep; + Handlebars.registerHelper(helpers('path')); describe('{{extname}}', function() { @@ -24,10 +27,10 @@ describe('{{extname}}', function() { describe('{{relative}}', function() { it('should return the relative path from file A to file B', function() { var template = Handlebars.compile('{{relative "dist/docs.html" "index.html"}}'); - template().should.equal('../index.html'); + template().should.equal(upPath + 'index.html'); }); it('should return the relative path from file A to file B', function() { var template = Handlebars.compile('{{relative "examples/result/md/path.md" "examples/assets"}}'); - template().should.equal('../../assets'); + template().should.equal(upPath + upPath + 'assets'); }); });