|
@@ -165,7 +165,24 @@ describe('#produceConfigObject paths', function () {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- it('should works with array paths correctly', function (done) {
|
|
|
+ it('should work with array paths correctly', function (done) {
|
|
|
+ builder.produceConfigObject(fixture('arrays-in-paths'), function (err, result) {
|
|
|
+ assert.ifError(err);
|
|
|
+ assert.deepEqual(result, {
|
|
|
+ paths: {
|
|
|
+ dot0: ".", rel0: "relative", sibling0: "../sibling", abs0: "/absolute", uri0: "http://example.com/uri",
|
|
|
+ arr0: [".", "relative", "../sibling", "/absolute", "http://example.com/uri"],
|
|
|
+ dot1: "deep", rel1: "deep/relative", sibling1: "sibling", abs1: "/absolute", uri1: "http://example.com/uri",
|
|
|
+ arr1: ["deep", "deep/relative", "sibling", "/absolute", "http://example.com/uri"],
|
|
|
+ dot2: "z2/other", rel2: "z2/other/relative", sibling2: "z2/sibling", abs2: "/absolute", uri2: "http://example.com/uri",
|
|
|
+ arr2: ["z2/other", "z2/other/relative", "z2/sibling", "/absolute", "http://example.com/uri"]
|
|
|
+ }
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ it('should work with same paths correctly if used more times', function (done) {
|
|
|
builder.produceConfigObject(fixture('arrays-in-paths'), function (err, result) {
|
|
|
assert.ifError(err);
|
|
|
assert.deepEqual(result, {
|