jenkins-bot has submitted this change and it was merged.
Change subject: Use mw.template.compile for compiling in View.js test Update
tests to avoid deprecation warnings
......................................................................
Use mw.template.compile for compiling in View.js test
Update tests to avoid deprecation warnings
Change-Id: Ic3ed72ae1ee3393b6eddf8ce2e3bef24d2913e71
---
M tests/javascripts/common/test_View.js
1 file changed, 5 insertions(+), 5 deletions(-)
Approvals:
Phuedx: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/javascripts/common/test_View.js
b/tests/javascripts/common/test_View.js
index f9e9c73..c14d796 100644
--- a/tests/javascripts/common/test_View.js
+++ b/tests/javascripts/common/test_View.js
@@ -20,7 +20,7 @@
}
};
// Register template compiler
- M.template.registerCompiler( 'xyz', compiler );
+ mw.template.registerCompiler( 'xyz', compiler );
}
} );
@@ -69,7 +69,7 @@
var ChildView, view;
ChildView = View.extend( {
className: 'my-class',
- template: M.template.compile(
'<h1>{{title}}</h1><p>{{content}}</p>', 'xyz' ),
+ template: mw.template.compile(
'<h1>{{title}}</h1><p>{{content}}</p>', 'xyz' ),
title: function() {
return this.$( 'h1' ).text();
},
@@ -89,12 +89,12 @@
var ParentView, ChildView, view;
ParentView = View.extend( {
- template: M.template.compile( '<h1>{{title}}</h1>{{>content}}',
'xyz' )
+ template: mw.template.compile(
'<h1>{{title}}</h1>{{>content}}', 'xyz' )
} );
ChildView = ParentView.extend( {
templatePartials: {
- content: M.template.compile( '<p>{{text}}</p>', 'xyz' )
+ content: mw.template.compile( '<p>{{text}}</p>', 'xyz' )
}
} );
@@ -148,7 +148,7 @@
QUnit.test( 'View#preRender', 1, function( assert ) {
var ChildView, view;
ChildView = View.extend( {
- template: M.template.compile( '<p>{{text}}</p>', 'xyz' ),
+ template: mw.template.compile( '<p>{{text}}</p>', 'xyz' ),
preRender: function( options ) {
options.text = 'hello';
}
--
To view, visit https://gerrit.wikimedia.org/r/170776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3ed72ae1ee3393b6eddf8ce2e3bef24d2913e71
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Mantle
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits