mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(file-system-access): join paths without leading slash
This commit is contained in:
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user