1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/sync/tests/unit/test_utils_getErrorString.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +Cu.import("resource://services-sync/util.js"); 1.5 + 1.6 +function run_test() { 1.7 + let str; 1.8 + 1.9 + // we just test whether the returned string includes the 1.10 + // string "unknown", should be good enough 1.11 + 1.12 + str = Utils.getErrorString("error.login.reason.account"); 1.13 + do_check_true(str.match(/unknown/i) == null); 1.14 + 1.15 + str = Utils.getErrorString("foobar"); 1.16 + do_check_true(str.match(/unknown/i) != null); 1.17 +}