diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-20 14:12:48 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-20 14:12:48 +0000 |
commit | f527e6e1855f30cf5ca5cb834b2d20438299a70e (patch) | |
tree | 9d5dd3e33f86cf43c0b445822341896e20027f94 /spec/javascripts/ide/helpers.js | |
parent | 68b914c9371e6e3fffc6afde23ca77a77ca688f2 (diff) | |
download | gitlab-ce-f527e6e1855f30cf5ca5cb834b2d20438299a70e.tar.gz |
Move IDE to CE
This also makes the IDE generally available
Diffstat (limited to 'spec/javascripts/ide/helpers.js')
-rw-r--r-- | spec/javascripts/ide/helpers.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/javascripts/ide/helpers.js b/spec/javascripts/ide/helpers.js new file mode 100644 index 00000000000..67f9eaff44a --- /dev/null +++ b/spec/javascripts/ide/helpers.js @@ -0,0 +1,21 @@ +import { decorateData } from 'ee/ide/stores/utils'; +import state from 'ee/ide/stores/state'; +import commitState from 'ee/ide/stores/modules/commit/state'; + +export const resetStore = (store) => { + const newState = { + ...state(), + commit: commitState(), + }; + store.replaceState(newState); +}; + +export const file = (name = 'name', id = name, type = '') => decorateData({ + id, + type, + icon: 'icon', + url: 'url', + name, + path: name, + lastCommit: {}, +}); |