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
22e6e3f2
Commit
22e6e3f2
authored
Mar 16, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed specs & eslint
parent
b508b159
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
ee/app/assets/javascripts/ide/lib/editor.js
ee/app/assets/javascripts/ide/lib/editor.js
+1
-0
spec/javascripts/ide/lib/editor_spec.js
spec/javascripts/ide/lib/editor_spec.js
+22
-8
No files found.
ee/app/assets/javascripts/ide/lib/editor.js
View file @
22e6e3f2
...
...
@@ -133,6 +133,7 @@ export default class Editor {
this
.
instance
=
null
;
if
(
process
.
env
.
NODE_ENV
!==
'
test
'
)
{
// eslint-disable-next-line no-console
console
.
error
(
e
);
}
}
...
...
spec/javascripts/ide/lib/editor_spec.js
View file @
22e6e3f2
...
...
@@ -8,7 +8,7 @@ describe('Multi-file editor library', () => {
let
el
;
let
holder
;
beforeEach
(
(
done
)
=>
{
beforeEach
(
done
=>
{
el
=
document
.
createElement
(
'
div
'
);
holder
=
document
.
createElement
(
'
div
'
);
el
.
appendChild
(
holder
);
...
...
@@ -64,10 +64,18 @@ describe('Multi-file editor library', () => {
instance
.
createDiffInstance
(
holder
);
expect
(
instance
.
monaco
.
editor
.
createDiffEditor
).
toHaveBeenCalledWith
(
holder
,
{
readOnly
:
true
,
scrollBeyondLastLine
:
false
,
});
expect
(
instance
.
monaco
.
editor
.
createDiffEditor
).
toHaveBeenCalledWith
(
holder
,
{
model
:
null
,
contextmenu
:
true
,
minimap
:
{
enabled
:
false
,
},
readOnly
:
true
,
scrollBeyondLastLine
:
false
,
},
);
});
});
...
...
@@ -105,7 +113,9 @@ describe('Multi-file editor library', () => {
});
it
(
'
sets original & modified when diff editor
'
,
()
=>
{
spyOn
(
instance
.
instance
,
'
getEditorType
'
).
and
.
returnValue
(
'
vs.editor.IDiffEditor
'
);
spyOn
(
instance
.
instance
,
'
getEditorType
'
).
and
.
returnValue
(
'
vs.editor.IDiffEditor
'
,
);
spyOn
(
instance
.
instance
,
'
setModel
'
);
instance
.
attachModel
(
model
);
...
...
@@ -121,7 +131,9 @@ describe('Multi-file editor library', () => {
instance
.
attachModel
(
model
);
expect
(
instance
.
dirtyDiffController
.
attachModel
).
toHaveBeenCalledWith
(
model
);
expect
(
instance
.
dirtyDiffController
.
attachModel
).
toHaveBeenCalledWith
(
model
,
);
});
it
(
'
re-decorates with the dirty diff controller
'
,
()
=>
{
...
...
@@ -129,7 +141,9 @@ describe('Multi-file editor library', () => {
instance
.
attachModel
(
model
);
expect
(
instance
.
dirtyDiffController
.
reDecorate
).
toHaveBeenCalledWith
(
model
);
expect
(
instance
.
dirtyDiffController
.
reDecorate
).
toHaveBeenCalledWith
(
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