Skip to content

Commit

Permalink
shorten function name
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed Dec 9, 2024
1 parent 94cdb9d commit ccf2f74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/twinkleblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,7 @@ Twinkle.block.callback.issue_template = function twinkleblockCallbackIssueTempla
// "talk page" of an IP range (which does not exist)
const userTalkPage = 'User_talk:' + mw.config.get('wgRelevantUserName');

const params = Twinkle.block.callback.combineFormDataAndFieldTemplateOptions(
const params = Twinkle.block.combineFormDataAndFieldTemplateOptions(
formData,
Twinkle.block.blockPresetsInfo[formData.template],
Twinkle.block.field_template_options.block_reason,
Expand All @@ -1916,7 +1916,7 @@ Twinkle.block.callback.issue_template = function twinkleblockCallbackIssueTempla
wikipedia_page.load(Twinkle.block.callback.main);
};

Twinkle.block.callback.combineFormDataAndFieldTemplateOptions = function(formData, messageData, reason, disabletalk, noemail, nocreate) {
Twinkle.block.combineFormDataAndFieldTemplateOptions = function(formData, messageData, reason, disabletalk, noemail, nocreate) {
return $.extend(formData, {
messageData: messageData,
reason: reason,
Expand Down
4 changes: 2 additions & 2 deletions tests/twinkleblock.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
describe('modules/twinkleblock', () => {
describe('callback.combineFormDataAndFieldTemplateOptions', () => {
describe('combineFormDataAndFieldTemplateOptions', () => {
// https://github.com/wikimedia-gadgets/twinkle/issues/2106
test('regression test: merging true and undefined should return true', () => {
const formData = {disabletalk: true};
Expand All @@ -9,7 +9,7 @@ describe('modules/twinkleblock', () => {
const noemail = undefined;
const nocreate = undefined;
const expected = {disabletalk: true};
expect(Twinkle.block.callback.combineFormDataAndFieldTemplateOptions(formData, messageData, reason, disabletalk, noemail, nocreate)).toStrictEqual(expected);
expect(Twinkle.block.combineFormDataAndFieldTemplateOptions(formData, messageData, reason, disabletalk, noemail, nocreate)).toStrictEqual(expected);
});
});
});

0 comments on commit ccf2f74

Please sign in to comment.