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
dcbfa848
Commit
dcbfa848
authored
Mar 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dispose models before setup
parent
581d486a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
spec/javascripts/repo/components/repo_editor_spec.js
spec/javascripts/repo/components/repo_editor_spec.js
+6
-3
No files found.
spec/javascripts/repo/components/repo_editor_spec.js
View file @
dcbfa848
...
...
@@ -34,7 +34,6 @@ describe('RepoEditor', () => {
resetStore
(
vm
.
$store
);
Editor
.
editorInstance
.
dirtyDiffController
.
dispose
();
Editor
.
editorInstance
.
modelManager
.
dispose
();
});
...
...
@@ -66,6 +65,8 @@ describe('RepoEditor', () => {
it
(
'
creates new model
'
,
()
=>
{
spyOn
(
vm
.
editor
,
'
createModel
'
).
and
.
callThrough
();
Editor
.
editorInstance
.
modelManager
.
dispose
();
vm
.
setupEditor
();
expect
(
vm
.
editor
.
createModel
).
toHaveBeenCalledWith
(
vm
.
$store
.
getters
.
activeFile
);
...
...
@@ -75,6 +76,8 @@ describe('RepoEditor', () => {
it
(
'
attaches model to editor
'
,
()
=>
{
spyOn
(
vm
.
editor
,
'
attachModel
'
).
and
.
callThrough
();
Editor
.
editorInstance
.
modelManager
.
dispose
();
vm
.
setupEditor
();
expect
(
vm
.
editor
.
attachModel
).
toHaveBeenCalledWith
(
vm
.
model
);
...
...
@@ -83,6 +86,8 @@ describe('RepoEditor', () => {
it
(
'
adds callback methods
'
,
()
=>
{
spyOn
(
vm
.
editor
,
'
onPositionChange
'
).
and
.
callThrough
();
Editor
.
editorInstance
.
modelManager
.
dispose
();
vm
.
setupEditor
();
expect
(
vm
.
editor
.
onPositionChange
).
toHaveBeenCalled
();
...
...
@@ -90,8 +95,6 @@ describe('RepoEditor', () => {
});
it
(
'
updates state when model content changed
'
,
(
done
)
=>
{
vm
.
setupEditor
();
vm
.
model
.
setValue
(
'
testing 123
'
);
setTimeout
(()
=>
{
...
...
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