Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-05-11 10:49:30 +0300
committerGitHub <noreply@github.com>2021-05-11 10:49:30 +0300
commit9fe36edf683af02574bf6bbd6c9b27de93bd31b1 (patch)
tree111d2b788e990a58277ff4543cfd44c5815ac795 /js/tests/unit/util
parent7647b8fe5b77120ba319e7119bb0515d91f734da (diff)
Extract static `DATA_KEY` & `EVENT_KEY` to base-component (#33635)
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
Diffstat (limited to 'js/tests/unit/util')
-rw-r--r--js/tests/unit/util/index.spec.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/tests/unit/util/index.spec.js b/js/tests/unit/util/index.spec.js
index 11b6f7fa49..a7c1c28982 100644
--- a/js/tests/unit/util/index.spec.js
+++ b/js/tests/unit/util/index.spec.js
@@ -560,9 +560,10 @@ describe('Util', () => {
it('should define a plugin on the jQuery instance', () => {
const pluginMock = function () {}
+ pluginMock.NAME = 'test'
pluginMock.jQueryInterface = function () {}
- Util.defineJQueryPlugin('test', pluginMock)
+ Util.defineJQueryPlugin(pluginMock)
expect(fakejQuery.fn.test).toBe(pluginMock.jQueryInterface)
expect(fakejQuery.fn.test.Constructor).toBe(pluginMock)
expect(typeof fakejQuery.fn.test.noConflict).toEqual('function')