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:
Diffstat (limited to 'spec/frontend/editor/helpers.js')
-rw-r--r--spec/frontend/editor/helpers.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/spec/frontend/editor/helpers.js b/spec/frontend/editor/helpers.js
new file mode 100644
index 00000000000..6f7cdf6efb3
--- /dev/null
+++ b/spec/frontend/editor/helpers.js
@@ -0,0 +1,53 @@
+export class MyClassExtension {
+ // eslint-disable-next-line class-methods-use-this
+ provides() {
+ return {
+ shared: () => 'extension',
+ classExtMethod: () => 'class own method',
+ };
+ }
+}
+
+export function MyFnExtension() {
+ return {
+ fnExtMethod: () => 'fn own method',
+ provides: () => {
+ return {
+ fnExtMethod: () => 'class own method',
+ };
+ },
+ };
+}
+
+export const MyConstExt = () => {
+ return {
+ provides: () => {
+ return {
+ constExtMethod: () => 'const own method',
+ };
+ },
+ };
+};
+
+export const conflictingExtensions = {
+ WithInstanceExt: () => {
+ return {
+ provides: () => {
+ return {
+ use: () => 'A conflict with instance',
+ ownMethod: () => 'Non-conflicting method',
+ };
+ },
+ };
+ },
+ WithAnotherExt: () => {
+ return {
+ provides: () => {
+ return {
+ shared: () => 'A conflict with extension',
+ ownMethod: () => 'Non-conflicting method',
+ };
+ },
+ };
+ },
+};