mediawiki-extensions-Popups/tests/qunit/ext.popups
joakin 557fd113c8 Hygiene: Use factory functions instead of classes
Instead of using constructor functions, use factory functions to
generate the gateway objects, because of:

* Consistency on the approach in the repository, no constructor
  functions are used, the factory function pattern prevales.
* Real private data with closures
* No use of `this`, which is dynamic and unbound in JS and a source of
  errors. In contrast, by using a factory function, the
  function/methods-of-the-object are tightly bound to the internal data.

Additional changes:
* Specify more the type of createRESTBaseGateway's parameter to improve
clarity on the intent of the parameter
  * From: @param {jQuery} api
  * To:   @param {Function} ajax function from jQuery for example

Supporting documentation:
* https://medium.com/javascript-scene/javascript-factory-functions-vs-constructor-functions-vs-classes-2f22ceddf33e

Change-Id: Iacbb098b646843a01f459b15343057e2e4851d35
2017-02-08 18:28:21 +01:00
..
changeListeners Hygiene: Make settings reducer control footer link 2017-01-17 06:40:36 -08:00
preview model: extract -> page 2017-02-02 17:06:46 +00:00
reducers Remove last modified line 2017-02-02 11:28:11 +00:00
stubs Hygiene: Remove experiment-related code 2016-12-16 10:59:47 +00:00
actions.test.js Hygiene: Use factory functions instead of classes 2017-02-08 18:28:21 +01:00
changeListener.test.js Add footer link change listener 2016-11-16 15:20:34 +00:00
checkin.test.js Fix checkin tests to use fake timers 2017-01-10 09:31:32 -08:00
counts.test.js Include user's preview count in BOOT action 2016-12-12 13:01:44 +00:00
eventLoggingChangeListener.test.js Initial Popups logging implementation 2016-12-12 13:01:44 +00:00
gateway.test.js Hygiene: Use factory functions instead of classes 2017-02-08 18:28:21 +01:00
integration.test.js Add support for RESTBase endpoint consumption 2017-02-07 12:36:11 -05:00
isEnabled.test.js Send blob to everyone 2017-01-17 06:40:24 -08:00
pageVisibility.test.js Add reading depth 2016-12-21 15:08:20 -05:00
previewBehavior.test.js Vary cog click behavior 2017-01-15 16:20:22 -08:00
processLinks.test.js Hygiene: #processLinks Improve wording on tests 2016-11-30 17:01:54 +00:00
schema.test.js Hygiene: Rename SchemaPopupsSamplingRate 2017-01-15 11:01:00 -08:00
settingsDialog.test.js Update the settings enabled radio with the enabled state 2016-12-16 10:29:34 +00:00
userSettings.test.js Hygiene: Remove experiment-related code 2016-12-16 10:59:47 +00:00
wait.test.js Render previews 2016-11-24 18:07:03 +00:00