diff options
Diffstat (limited to 'services/sync/tests/unit/test_utils_getErrorString.js')
-rw-r--r-- | services/sync/tests/unit/test_utils_getErrorString.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/services/sync/tests/unit/test_utils_getErrorString.js b/services/sync/tests/unit/test_utils_getErrorString.js new file mode 100644 index 000000000..d64e43540 --- /dev/null +++ b/services/sync/tests/unit/test_utils_getErrorString.js @@ -0,0 +1,14 @@ +Cu.import("resource://services-sync/util.js"); + +function run_test() { + let str; + + // we just test whether the returned string includes the + // string "unknown", should be good enough + + str = Utils.getErrorString("error.login.reason.account"); + do_check_true(str.match(/unknown/i) == null); + + str = Utils.getErrorString("foobar"); + do_check_true(str.match(/unknown/i) != null); +} |