fix(file-system-access): join paths without leading slash

This commit is contained in:
sis0k0
2016-11-07 14:29:06 +02:00
parent 5582f6158f
commit 7b6811ba49
2 changed files with 12 additions and 4 deletions

View File

@@ -32,4 +32,12 @@ export var test_file_exists_on_folder = function () {
}
TKUnit.assertTrue(fs.File.exists(path), "File.exists() returned false for folder!");
};
};
export var test_leading_slash_is_not_returned = function () {
var parts = ["app", "tns_modules", "fileName"];
var expected = parts.join("/");
var path = fs.path.join(...parts);
TKUnit.assertEqual(path, expected, "Leading slash should not be part of the path");
}