mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
Tests: verify invalid string log messages
This commit is contained in:
parent
7131c7a7da
commit
2a3044e0cf
@ -1,6 +1,12 @@
|
|||||||
|
/* global module, asyncTest, $, ok, equal, notEqual, start, test, Util, testLog */
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
module("strings");
|
module("strings", {
|
||||||
|
setup: function () {
|
||||||
|
testLog.reset();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test("getSubString", function() {
|
test("getSubString", function() {
|
||||||
equal(OpenSeadragon.getString("Errors.Dzi"),
|
equal(OpenSeadragon.getString("Errors.Dzi"),
|
||||||
@ -15,10 +21,13 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("getInvalidString", function() {
|
test("getInvalidString", function() {
|
||||||
equal(OpenSeadragon.getString("Greeting"), "",
|
equal(OpenSeadragon.getString("Greeting"), "", "Handled unset string key");
|
||||||
"Handled unset string key");
|
ok(testLog.debug.contains('["Untranslated source string:","Greeting"]'),
|
||||||
equal(OpenSeadragon.getString("Errors"), "",
|
'Invalid string keys are logged');
|
||||||
"Handled requesting parent key");
|
|
||||||
|
equal(OpenSeadragon.getString("Errors"), "", "Handled requesting parent key");
|
||||||
|
ok(testLog.debug.contains('["Untranslated source string:","Errors"]'),
|
||||||
|
'Invalid string parent keys are logged');
|
||||||
});
|
});
|
||||||
|
|
||||||
test("setString", function() {
|
test("setString", function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user