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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-04 17:47:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-04 17:47:28 +0300
commit901adec7f6b9d5372de49112ec388ba9007ef4d9 (patch)
treeb2b5dd538671305ff9df45b1b24a9243aab715a1 /spec/frontend
parent3bc07a0be9ce3b8f736890a0513283f04796b37e (diff)
Add latest changes from gitlab-org/gitlab@14-6-stable-ee
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/editor/source_editor_instance_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/editor/source_editor_instance_spec.js b/spec/frontend/editor/source_editor_instance_spec.js
index f9518743ef8..99c4ff4f3fa 100644
--- a/spec/frontend/editor/source_editor_instance_spec.js
+++ b/spec/frontend/editor/source_editor_instance_spec.js
@@ -277,6 +277,17 @@ describe('Source Editor Instance', () => {
expect(extensionStore.set).toHaveBeenCalledWith('SEClassExtension', extension1);
});
+ it('correctly registers methods from the existing extension on an instance', () => {
+ const seInstance2 = new SourceEditorInstance({}, extensionStore);
+ seInstance.use({ definition: SEClassExtension });
+ const val1 = seInstance.classExtMethod();
+
+ seInstance2.use({ definition: SEClassExtension });
+
+ expect(seInstance2.classExtMethod).toBeDefined();
+ expect(seInstance2.classExtMethod()).toBe(val1); // from helpers.js we know classExtMethod()returns a string. Hence `toBe`
+ });
+
it.each`
desc | currentSetupOptions | newSetupOptions | expectedCallTimes
${'updates'} | ${undefined} | ${defSetupOptions} | ${2}