Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9b5b4fe3
Commit
9b5b4fe3
authored
Jan 12, 2021
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Editor Lite type constants
parent
e0527340
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/assets/javascripts/editor/constants.js
app/assets/javascripts/editor/constants.js
+3
-0
spec/frontend/ide/lib/editor_spec.js
spec/frontend/ide/lib/editor_spec.js
+2
-1
No files found.
app/assets/javascripts/editor/constants.js
View file @
9b5b4fe3
...
...
@@ -13,6 +13,9 @@ export const ERROR_INSTANCE_REQUIRED_FOR_EXTENSION = __(
export
const
EDITOR_READY_EVENT
=
'
editor-ready
'
;
export
const
EDITOR_TYPE_CODE
=
'
vs.editor.ICodeEditor
'
;
export
const
EDITOR_TYPE_DIFF
=
'
vs.editor.IDiffEditor
'
;
//
// EXTENSIONS' CONSTANTS
//
...
...
spec/frontend/ide/lib/editor_spec.js
View file @
9b5b4fe3
...
...
@@ -7,6 +7,7 @@ import {
import
Editor
from
'
~/ide/lib/editor
'
;
import
{
createStore
}
from
'
~/ide/stores
'
;
import
{
defaultEditorOptions
}
from
'
~/ide/lib/editor_options
'
;
import
{
EDITOR_TYPE_DIFF
}
from
'
~/editor/constants
'
;
import
{
file
}
from
'
../helpers
'
;
describe
(
'
Multi-file editor library
'
,
()
=>
{
...
...
@@ -125,7 +126,7 @@ describe('Multi-file editor library', () => {
});
it
(
'
sets original & modified when diff editor
'
,
()
=>
{
jest
.
spyOn
(
instance
.
instance
,
'
getEditorType
'
).
mockReturnValue
(
'
vs.editor.IDiffEditor
'
);
jest
.
spyOn
(
instance
.
instance
,
'
getEditorType
'
).
mockReturnValue
(
EDITOR_TYPE_DIFF
);
jest
.
spyOn
(
instance
.
instance
,
'
setModel
'
).
mockImplementation
(()
=>
{});
instance
.
attachModel
(
model
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment