dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resourceloader: Deprecate mw.Map
[lhc/web/wiklou.git]
/
tests
/
qunit
/
suites
/
resources
/
mediawiki
/
mediawiki.test.js
diff --git
a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
index
ab463a9
..
1518a80
100644
(file)
--- a/
tests/qunit/suites/resources/mediawiki/mediawiki.test.js
+++ b/
tests/qunit/suites/resources/mediawiki/mediawiki.test.js
@@
-65,10
+65,11
@@
);
} );
);
} );
- QUnit.test( 'mw.Map',
35,
function ( assert ) {
+ QUnit.test( 'mw.Map', function ( assert ) {
var arry, conf, funky, globalConf, nummy, someValues;
conf = new mw.Map();
var arry, conf, funky, globalConf, nummy, someValues;
conf = new mw.Map();
+
// Dummy variables
funky = function () {};
arry = [];
// Dummy variables
funky = function () {};
arry = [];
@@
-126,15
+127,15
@@
lorem: 'ipsum'
}, 'Map.get returns multiple values correctly as an object' );
lorem: 'ipsum'
}, 'Map.get returns multiple values correctly as an object' );
- assert.deepEqual( conf, new mw.Map( conf.values ), 'new mw.Map maps over existing values-bearing object' );
-
assert.deepEqual( conf.get( [ 'foo', 'notExist' ] ), {
foo: 'bar',
notExist: null
}, 'Map.get return includes keys that were not found as null values' );
// Interacting with globals and accessing the values object
assert.deepEqual( conf.get( [ 'foo', 'notExist' ] ), {
foo: 'bar',
notExist: null
}, 'Map.get return includes keys that were not found as null values' );
// Interacting with globals and accessing the values object
+ this.suppressWarnings();
assert.strictEqual( conf.get(), conf.values, 'Map.get returns the entire values object by reference (if called without arguments)' );
assert.strictEqual( conf.get(), conf.values, 'Map.get returns the entire values object by reference (if called without arguments)' );
+ this.restoreWarnings();
conf.set( 'globalMapChecker', 'Hi' );
conf.set( 'globalMapChecker', 'Hi' );
@@
-170,11
+171,7
@@
}
} );
}
} );
- QUnit.test( 'mw.config', 1, function ( assert ) {
- assert.ok( mw.config instanceof mw.Map, 'mw.config instance of mw.Map' );
- } );
-
- QUnit.test( 'mw.message & mw.messages', 100, function ( assert ) {
+ QUnit.test( 'mw.message & mw.messages', function ( assert ) {
var goodbye, hello;
// Convenience method for asserting the same result for multiple formats
var goodbye, hello;
// Convenience method for asserting the same result for multiple formats
@@
-189,7
+186,6
@@
}
assert.ok( mw.messages, 'messages defined' );
}
assert.ok( mw.messages, 'messages defined' );
- assert.ok( mw.messages instanceof mw.Map, 'mw.messages instance of mw.Map' );
assert.ok( mw.messages.set( 'hello', 'Hello <b>awesome</b> world' ), 'mw.messages.set: Register' );
hello = mw.message( 'hello' );
assert.ok( mw.messages.set( 'hello', 'Hello <b>awesome</b> world' ), 'mw.messages.set: Register' );
hello = mw.message( 'hello' );