Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change file path in test fixture files and better log

  • Loading branch information...
commit 0a7977c9fc18cbbc7846823294ddc8ace3258815 1 parent eb06e43
Lichun Zhan authored
View
11 index.js
@@ -397,12 +397,11 @@ Ycb.prototype = {
this.settings[key] = section;
} else {
if (options.debug) {
- if (section.__ycb_source__) {
- console.log("Settings " + JSON.stringify(settings, null) + " of " + section.__ycb_source__
- + " being merged into " + this.settings[key].__ycb_source__);
- } else {
- console.log("Settings " + JSON.stringify(settings, null) + " from different sections being merged");
- }
+ console.log('Merging section ' + JSON.stringify(settings) + (
+ section.__ycb_source__ ? (' from ' + section.__ycb_source__) : ''
+ ) + (
+ this.settings[key] ? (' onto ' + this.settings[key].__ycb_source__) : ''
+ ));
}
objectMerge(section, this.settings[key]);
}
View
2  tests/fixtures/simple-1.json
@@ -9,6 +9,6 @@
"home": "http://www.yahoo.com",
"mail": "http://mail.yahoo.com"
},
- "__ycb_source__": "a/b/c/x.json"
+ "__ycb_source__": "tests/fixtures/simple-1.json"
}
]
View
2  tests/fixtures/simple-2.json
@@ -9,6 +9,6 @@
"home": "http://www.yahoo.com",
"mail": "http://mail.yahoo.com"
},
- "__ycb_source__": "a/b/c/x.json"
+ "__ycb_source__": "tests/fixtures/simple-2.json"
}
]
View
10 tests/fixtures/simple-3.json
@@ -33,30 +33,30 @@
"home": "http://fr.yahoo.com",
"mail": "http://fr.mail.yahoo.com"
},
- "__ycb_source__": "a/b/c/x2.json"
+ "__ycb_source__": "tests/fixtures/simple-3.json"
},
{
"settings": ["flavor:att"],
"logo": "yahoo_att.png",
- "__ycb_source__": "a/b/c/x1.json"
+ "__ycb_source__": "tests/fixtures/simple-3.json"
},
{
"settings": ["flavor:att","region:ca"],
"logo": "yahoo_att_CA.png",
- "__ycb_source__": "a/b/c/x.json"
+ "__ycb_source__": "tests/fixtures/simple-3.json"
},
{
"settings": ["flavor:bt","region:gb"],
"logo": "yahoo_bt_GB.png",
- "__ycb_source__": "a/b/c/x.json"
+ "__ycb_source__": "tests/fixtures/simple-3.json"
},
{
"settings": ["region:fr","flavor:bt"],
"logo": "yahoo_bt_FR.png",
- "__ycb_source__": "a/b/c/x.json"
+ "__ycb_source__": "tests/fixtures/simple-3.json"
}
]
View
4 tests/fixtures/simple-4.json
@@ -7,7 +7,7 @@
"oof": 4,
"rab": 5,
"zab": 6,
- "__ycb_source__": "a/b/c/x.json"
+ "__ycb_source__": "tests/fixtures/simple-4.json"
},
{
"settings": ["lang:fr"],
@@ -17,6 +17,6 @@
"oof": null,
"rab": 0,
"zab": false,
- "__ycb_source__": "a/b/c/y.json"
+ "__ycb_source__": "tests/fixtures/simple-4.json"
}
]
View
2  tests/unit.js
@@ -180,7 +180,7 @@ cases = {
A.areSame('YRB_YAHOO_2nd', ycb.settings['*/*/*/*/*/*/*/*/*/*/*'].title_key);
A.areSame('yahoo.png', ycb.settings['*/*/*/*/*/*/*/*/*/*/*'].logo1);
- A.areSame('a/b/c/x.json', ycb.settings['*/*/*/*/*/*/*/*/*/*/*'].__ycb_source__);
+ A.areSame('tests/fixtures/simple-2.json', ycb.settings['*/*/*/*/*/*/*/*/*/*/*'].__ycb_source__);
A.isNotUndefined(ycb.dimensions[7].region.us);
},
Please sign in to comment.
Something went wrong with that request. Please try again.