I hereby claim:
- I am KevinSalter on github.
- I am kevinsalter (https://keybase.io/kevinsalter) on keybase.
- I have a public key whose fingerprint is 589E 8D1E A4D8 F3E7 B23A 2013 439E B75C C719 B6CF
To claim this, I am signing this object:
#### Issue description | |
#### System Info | |
- OS? | |
- Browser? | |
I hereby claim:
To claim this, I am signing this object:
import { assert } from 'chai'; | |
import { ActionsObservable } from 'redux-observable'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/observable/throw'; | |
import 'rxjs/add/observable/of'; | |
import 'rxjs/add/operator/toArray'; | |
import saveFieldEpic from './saveField.js'; |
import { createStore, applyMiddleware } from 'redux'; | |
import { createEpicMiddleware, combineEpics } from 'redux-observable'; | |
import { ajax } from 'rxjs/observable/dom/ajax'; | |
import RootReducer from './reducers'; | |
import saveFieldEpic from './epics/saveFieldEpic.js'; | |
const rootEpic = (...args) => combineEpics( | |
saveFieldEpic, |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/observable/of'; | |
import 'rxjs/add/operator/catch'; | |
import 'rxjs/add/operator/debounceTime'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/mergeMap'; | |
import 'rxjs/add/operator/startWith'; | |
import { | |
isSaving, savingSuccess, savingError, |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/add/observable/dom/ajax'; | |
import 'rxjs/add/observable/of'; | |
import 'rxjs/add/operator/catch'; | |
import 'rxjs/add/operator/debounceTime'; | |
import 'rxjs/add/operator/map'; | |
import 'rxjs/add/operator/mergeMap'; | |
import 'rxjs/add/operator/startWith'; | |
import { |
/** | |
* ellipsisify | |
* @param {string} filename - The filename to be truncated. | |
* @param {number} lengthThreshold - (optional) The minimum length of filename to truncate. | |
*/ | |
export const ellipsisify = (filename, lengthThreshold = 20) => { | |
// just return the filename if it's less than 20 characters long | |
if (filename.length < lengthThreshold) return filename; |
const reorderArray = (event, originalArray) => { | |
const movedItem = originalArray.find((item, index) => index === event.oldIndex); | |
const remainingItems = originalArray.filter((item, index) => index !== event.oldIndex); | |
const reorderedItems = [ | |
...remainingItems.slice(0, event.newIndex), | |
movedItem, | |
...remainingItems.slice(event.newIndex) | |
]; | |
const getReorderedQuestions = (event, questions) => { | |
const movedQuestion = questions.find((question, index) => index === event.oldIndex); | |
const remainingQuestions = questions.filter((question, index) => index !== event.oldIndex); | |
const reorderedQuestions = []; | |
remainingQuestions.forEach((question, index) => { | |
if (index === event.newIndex) { | |
reorderedQuestions.push(movedQuestion); | |
reorderedQuestions.push(question); | |
} else { |
import React from 'react'; | |
import {shallow} from 'enzyme'; | |
import {assert} from 'chai'; | |
import {spy} from 'sinon'; | |
import MainView from '../src/main-view.js'; | |
import {Users} from '../fixtures/users.js'; | |
describe('<MainView />', () => { | |
const MAIN_VIEW_PROPS = { |