From cccaa16098484a7d9df26c18c0b6aa5b9defbeb5 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 6 Sep 2015 17:35:10 +0100 Subject: Extract uriToPath --- tests/docx/files.tests.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/docx/files.tests.js b/tests/docx/files.tests.js index d3f3391..fecc6eb 100644 --- a/tests/docx/files.tests.js +++ b/tests/docx/files.tests.js @@ -4,6 +4,7 @@ var assert = require("assert"); var promises = require("../../lib/promises"); var Files = require("../../lib/docx/files").Files; +var uriToPath = require("../../lib/docx/files").uriToPath; var testing = require("../testing"); var test = testing.test; @@ -22,3 +23,10 @@ describe("Files", function() { }); }); }); + + +describe("uriToPath", function() { + test("leading slash is retained on non-Windows file URIs", function() { + assert.equal(uriToPath("file:///a/b/c"), "/a/b/c"); + }); +}); -- cgit v1.2.3