From f902ccfd5339a71e5855ecd020186860f2db0a8b Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Fri, 13 Oct 2017 14:27:25 +0200 Subject: [PATCH] Chore/use jest framework (#361) As agreed upon, switching to jest for unit tests --- .babelrc | 7 +- .eslintrc | 2 +- config/setup.js | 22 +- jest.config.js | 10 + package.json | 15 +- src/EditModel/__tests__/actions.spec.js | 18 + src/EditModel/actions.spec.js | 18 - .../event-program/__tests__/actions.spec.js | 122 ++ .../__tests__/eventProgramStore.spec.js | 187 +++ .../metadataimport-helpers.spec.js | 64 +- .../event-program/__tests__/reducers.spec.js | 123 ++ .../event-program/__tests__/selectors.spec.js | 29 + src/EditModel/event-program/actions.spec.js | 116 -- .../__tests__/actions.spec.js | 108 ++ .../{ => __tests__}/epics.spec.js | 141 +- .../assign-data-elements/actions.spec.js | 99 -- .../event-program/eventProgramStore.spec.js | 178 --- src/EditModel/event-program/reducers.spec.js | 134 -- src/EditModel/event-program/selectors.spec.js | 29 - .../__tests__/actions.spec.js | 122 ++ .../{ => __tests__}/epics.spec.js | 108 +- .../__tests__/reducers.spec.js | 71 +- .../__tests__/selectors.spec.js | 29 + .../program-indicator/actions.spec.js | 116 -- .../program-indicator/selectors.spec.js | 29 - .../stepper/__tests__/stepIterator.spec.js | 20 +- .../stepper/__tests__/stepper.spec.js | 162 +- {test => src/__fixtures__}/fixtureUpdater.js | 0 .../__fixtures__}/schemas/dataEntryForm.json | 0 .../__fixtures__}/schemas/program.json | 0 .../schemas/programNotificationTemplate.json | 0 .../__fixtures__}/schemas/programStage.json | 0 yarn.lock | 1370 ++++++++++++----- 33 files changed, 2039 insertions(+), 1410 deletions(-) create mode 100644 jest.config.js create mode 100644 src/EditModel/__tests__/actions.spec.js delete mode 100644 src/EditModel/actions.spec.js create mode 100644 src/EditModel/event-program/__tests__/actions.spec.js create mode 100644 src/EditModel/event-program/__tests__/eventProgramStore.spec.js rename src/EditModel/event-program/{ => __tests__}/metadataimport-helpers.spec.js (82%) create mode 100644 src/EditModel/event-program/__tests__/reducers.spec.js create mode 100644 src/EditModel/event-program/__tests__/selectors.spec.js delete mode 100644 src/EditModel/event-program/actions.spec.js create mode 100644 src/EditModel/event-program/assign-data-elements/__tests__/actions.spec.js rename src/EditModel/event-program/assign-data-elements/{ => __tests__}/epics.spec.js (78%) delete mode 100644 src/EditModel/event-program/assign-data-elements/actions.spec.js delete mode 100644 src/EditModel/event-program/eventProgramStore.spec.js delete mode 100644 src/EditModel/event-program/reducers.spec.js delete mode 100644 src/EditModel/event-program/selectors.spec.js create mode 100644 src/EditModel/program-indicator/__tests__/actions.spec.js rename src/EditModel/program-indicator/{ => __tests__}/epics.spec.js (58%) create mode 100644 src/EditModel/program-indicator/__tests__/selectors.spec.js delete mode 100644 src/EditModel/program-indicator/actions.spec.js delete mode 100644 src/EditModel/program-indicator/selectors.spec.js rename {test => src/__fixtures__}/fixtureUpdater.js (100%) rename {test/fixtures => src/__fixtures__}/schemas/dataEntryForm.json (100%) rename {test/fixtures => src/__fixtures__}/schemas/program.json (100%) rename {test/fixtures => src/__fixtures__}/schemas/programNotificationTemplate.json (100%) rename {test/fixtures => src/__fixtures__}/schemas/programStage.json (100%) diff --git a/.babelrc b/.babelrc index 89fc01d07..f83c00d02 100644 --- a/.babelrc +++ b/.babelrc @@ -11,7 +11,12 @@ ], "env": { "test": { - "presets": ["es2015", "react", "stage-0"] + "presets": ["es2015", "react", "stage-0"], + "only": [ + "src/*.js", + "src/**/*.js", + "config/*.js" + ] } } } diff --git a/.eslintrc b/.eslintrc index 62cf29d18..f83313b09 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,7 +2,7 @@ "extends": "dhis2", "env": { "browser": true, - "mocha": true + "jest": true }, "parser": "babel-eslint", "parserOptions": { diff --git a/config/setup.js b/config/setup.js index bfe0a98db..453a44efd 100644 --- a/config/setup.js +++ b/config/setup.js @@ -1,19 +1,5 @@ -require('babel-register')({ - ignore: function (path) { - if (/node_modules\/d2-ui/.test(path)) { - return false; - } +import 'jest-enzyme'; +import Enzyme from 'enzyme'; +import Adapter from 'enzyme-adapter-react-15'; - return /node_modules/.test(path); - } -}); - -/* istanbul ignore next */ -global.chai = require('chai'); -global.sinon = require('sinon'); - -// Chai plugins -global.chai.use(require('sinon-chai')); -global.chai.use(require('chai-enzyme')()); - -global.expect = global.chai.expect; +Enzyme.configure({ adapter: new Adapter() }); diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..2b365a8e6 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,10 @@ +module.exports = { + setupTestFrameworkScriptFile: '/config/setup.js', + testPathIgnorePatterns: [ + '/node_modules/', + '/lib/', + ], + transformIgnorePatterns: [ + '/node_modules/(?!d2-ui).+\\.js$', + ], +}; diff --git a/package.json b/package.json index e970d58d7..eeeabad1a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "start": "webpack-dev-server", "coverage": "NODE_ENV=test nyc --include src --exclude 'src/**/*.spec.js' --require babel-register --require babel-polyfill --require ignore-styles mocha --reporter dot --require config/setup.js --recursive 'src/**/*.spec.js'", "postcoverage": " nyc report --reporter=lcov", - "test": "NODE_ENV=test mocha --require babel-register --require babel-polyfill --require ignore-styles --reporter spec --require config/setup.js --recursive './src/**/*.spec.js'", + "test": "jest", "test:watch": "yarn test -- --watch", "prebuild": "yarn test", "build": "rm -rf build && NODE_ENV=production webpack --progress && npm run manifest", @@ -81,19 +81,18 @@ }, "dependencies": { "babel-polyfill": "^6.13.0", - "chai": "^3.5.0", - "chai-enzyme": "^0.6.1", - "enzyme": "^2.8.0", - "mocha": "^3.2.0", + "enzyme": "^3.0.0", + "enzyme-adapter-react-15": "^1.0.0", + "jest": "^21.2.1", + "jest-enzyme": "^4.0.0", "nyc": "10.1.2", "prop-types": "^15.6.0", "react-redux": "^5.0.3", "react-sortable-hoc": "^0.6.1", + "react-test-renderer": "15", "redux": "^3.6.0", "redux-observable": "^0.14.1", - "rxjs": "^5.2.0", - "sinon": "^2.1.0", - "sinon-chai": "^2.9.0" + "rxjs": "^5.2.0" }, "pre-commit": [ "validate", diff --git a/src/EditModel/__tests__/actions.spec.js b/src/EditModel/__tests__/actions.spec.js new file mode 100644 index 000000000..a53aae56b --- /dev/null +++ b/src/EditModel/__tests__/actions.spec.js @@ -0,0 +1,18 @@ +import * as actions from '../actions'; + +describe('Model to edit actions', () => { + describe('for notifying users', () => { + test('should defined the notification constants', () => { + expect(actions.NOTIFY_USER).toBe('NOTIFY_USER'); + }); + + test('should create a notify user action when calling notifyUser', () => { + const expectedAction = { + type: actions.NOTIFY_USER, + payload: undefined, + }; + + expect(actions.notifyUser()).toEqual(expectedAction); + }); + }); +}); diff --git a/src/EditModel/actions.spec.js b/src/EditModel/actions.spec.js deleted file mode 100644 index ee41b3edb..000000000 --- a/src/EditModel/actions.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -import * as actions from './actions'; - -describe('Model to edit actions', () => { - describe('for notifying users', () => { - it('should defined the notification constants', () => { - expect(actions.NOTIFY_USER).to.equal('NOTIFY_USER'); - }); - - it('should create a notify user action when calling notifyUser', () => { - const expectedAction = { - type: actions.NOTIFY_USER, - payload: undefined, - }; - - expect(actions.notifyUser()).to.deep.equal(expectedAction); - }); - }); -}); diff --git a/src/EditModel/event-program/__tests__/actions.spec.js b/src/EditModel/event-program/__tests__/actions.spec.js new file mode 100644 index 000000000..117deb098 --- /dev/null +++ b/src/EditModel/event-program/__tests__/actions.spec.js @@ -0,0 +1,122 @@ +import * as actions from '../actions'; + +describe('Event Program actions', () => { + describe('for stepper', () => { + test('should have defined the stepper constants', () => { + expect(actions.EVENT_PROGRAM_STEP_PREVIOUS).toBe('EVENT_PROGRAM_STEP_PREVIOUS'); + expect(actions.EVENT_PROGRAM_STEP_NEXT).toBe('EVENT_PROGRAM_STEP_NEXT'); + expect(actions.EVENT_PROGRAM_STEP_CHANGE).toBe('EVENT_PROGRAM_STEP_CHANGE'); + }); + + test('should create the EVENT_PROGRAM_STEP_CHANGE action', () => { + expect(actions.changeStep()).toEqual({ type: actions.EVENT_PROGRAM_STEP_CHANGE, payload: undefined }); + }); + + test('should use the parameter as the payload', () => { + expect(actions.changeStep('details')).toEqual({ type: actions.EVENT_PROGRAM_STEP_CHANGE, payload: 'details' }); + }); + + test('should create the EVENT_PROGRAM_STEP_NEXT action', () => { + expect(actions.nextStep()).toEqual({ type: actions.EVENT_PROGRAM_STEP_NEXT }); + }); + + test('should create the EVENT_PROGRAM_STEP_PREVIOUS action', () => { + expect(actions.previousStep()).toEqual({ type: actions.EVENT_PROGRAM_STEP_PREVIOUS }); + }); + }); + + describe('for loading a event program', () => { + test('should have the event program load constants', () => { + expect(actions.EVENT_PROGRAM_LOAD).toBe('EVENT_PROGRAM_LOAD'); + expect(actions.EVENT_PROGRAM_LOAD_SUCCESS).toBe('EVENT_PROGRAM_LOAD_SUCCESS'); + expect(actions.EVENT_PROGRAM_LOAD_ERROR).toBe('EVENT_PROGRAM_LOAD_ERROR'); + }); + + test('should create the EVENT_PROGRAM_LOAD action', () => { + expect(actions.loadEventProgram()).toEqual({ type: actions.EVENT_PROGRAM_LOAD, payload: undefined }); + }); + + test('should create the EVENT_PROGRAM_LOAD_SUCCESS action', () => { + expect(actions.loadEventProgramSuccess()).toEqual({ type: actions.EVENT_PROGRAM_LOAD_SUCCESS, payload: undefined }); + }); + + test('should create the EVENT_PROGRAM_LOAD_SUCCESS action', () => { + expect(actions.loadEventProgramFailure()).toEqual({ type: actions.EVENT_PROGRAM_LOAD_ERROR, payload: undefined }); + }); + }); + + describe('for editing models', () => { + test('should have defined the model constants', () => { + expect(actions.MODEL_TO_EDIT_LOADED).toBe('MODEL_TO_EDIT_LOADED'); + expect(actions.MODEL_TO_EDIT_FIELD_CHANGED).toBe('MODEL_TO_EDIT_FIELD_CHANGED'); + }); + + test('should create the action when calling editFieldChanged', () => { + const expectedAction = { + type: 'MODEL_TO_EDIT_FIELD_CHANGED', + payload: { + field: 'name', + value: 'John', + }, + }; + + expect(actions.editFieldChanged('name', 'John')).toEqual(expectedAction); + }); + }); + + describe('for saving an event program', () => { + test('should have defined the constants', () => { + expect(actions.EVENT_PROGRAM_SAVE).toBe('EVENT_PROGRAM_SAVE'); + expect(actions.EVENT_PROGRAM_SAVE_SUCCESS).toBe('EVENT_PROGRAM_SAVE_SUCCESS'); + expect(actions.EVENT_PROGRAM_SAVE_ERROR).toBe('EVENT_PROGRAM_SAVE_ERROR'); + }); + + test('should create the save action when calling saveEventProgram', () => { + const expectedAction = { + type: actions.EVENT_PROGRAM_SAVE, + payload: undefined, + }; + + expect(actions.saveEventProgram()).toEqual(expectedAction); + }); + + test( + 'should create the save success action when calling saveEventProgramSuccess', + () => { + const expectedAction = { + type: actions.EVENT_PROGRAM_SAVE_SUCCESS, + payload: undefined, + }; + + expect(actions.saveEventProgramSuccess()).toEqual(expectedAction); + } + ); + + test( + 'should create the save error action when calling saveEventProgramError', + () => { + const expectedAction = { + type: actions.EVENT_PROGRAM_SAVE_ERROR, + payload: new Error('Could not load'), + }; + + expect(actions.saveEventProgramError(new Error('Could not load'))).toEqual(expectedAction); + } + ); + }); + + describe('for notifying users', () => { + test('should defined the notification constants', () => { + expect(actions.NOTIFY_USER).toBe('NOTIFY_USER'); + }); + + test('should create a notify user action when calling notifyUser', () => { + const expectedAction = { + type: actions.NOTIFY_USER, + payload: undefined, + }; + + expect(actions.notifyUser()).toEqual(expectedAction); + }); + }); +}); diff --git a/src/EditModel/event-program/__tests__/eventProgramStore.spec.js b/src/EditModel/event-program/__tests__/eventProgramStore.spec.js new file mode 100644 index 000000000..2554db151 --- /dev/null +++ b/src/EditModel/event-program/__tests__/eventProgramStore.spec.js @@ -0,0 +1,187 @@ +import { Observable } from 'rxjs'; +import store, { isStoreStateDirty, getMetaDataToSend } from '../eventProgramStore'; +import ModelDefinition from 'd2/lib/model/ModelDefinition'; +import ModelDefinitions from 'd2/lib/model/ModelDefinitions'; +import programSchema from '../../../__fixtures__/schemas/program.json'; +import programStageSchema from '../../../__fixtures__/schemas/programStage.json'; +import programNotificationTemplateSchema from '../../../__fixtures__/schemas/programNotificationTemplate.json'; +import dataEntryFormSchema from '../../../__fixtures__/schemas/dataEntryForm.json'; +import { noop } from 'lodash/fp'; + +describe('Event Program Store', () => { + let mockState; + let program; + let programStage; + let dataEntryForm; + let programStageNotification; + let modelDefinitions; + + beforeAll(() => { + // Mock fetch + global.fetch = noop; + + program = ModelDefinition.createFromSchema(programSchema); + programStage = ModelDefinition.createFromSchema(programStageSchema); + programStageNotification = ModelDefinition.createFromSchema(programNotificationTemplateSchema); + dataEntryForm = ModelDefinition.createFromSchema(dataEntryFormSchema); + + modelDefinitions = ModelDefinitions.getModelDefinitions(); + + // Only add the modelDefs when they have not yet been added (This is kind of funky due to ModelDefinitions being a singleton) + modelDefinitions.program || modelDefinitions.add(program); + modelDefinitions.programStage || modelDefinitions.add(programStage); + modelDefinitions.programNotificationTemplate || modelDefinitions.add(programStageNotification); + modelDefinitions.programNotificationTemplate || modelDefinitions.add(dataEntryForm); + }); + + beforeEach(() => { + mockState = { + program: program.create(), + programStages: [programStage.create({ id: 'selCNHPqm5g', notificationTemplates: [] })], + programStageNotifications: { + selCNHPqm5g: [ + programStageNotification.create(), + ], + }, + dataEntryFormForProgramStage: { + selCNHPqm5g: dataEntryForm.create(), + }, + }; + + store.setState(mockState); + }); + + afterAll(() => { + delete global.fetch; + }); + + test('should be an Observable', () => { + expect(store).toBeInstanceOf(Observable); + }); + + test('should return the current state when requesting it', () => { + expect(store.getState()).toEqual(mockState); + }); + + test('should emit the status after subscribing to it', (done) => { + store + .take(1) + .do(state => expect(state).toEqual(mockState)) + .subscribe(() => done(), done); + }); + + test('should not accept invalid properties for the state', () => { + expect(() => store.setState({ name: 'John' })).toThrowError('You are attempting to set an invalid state onto the eventProgramStore'); + }); + + test('should throw if the passed state is not an object', () => { + expect(() => store.setState()).toThrowError('You are attempting to set a state that is a non object'); + }); + + xit('should merge the state with the old state', () => { + + }); + + describe('helpers', () => { + describe('isStoreStateDirty', () => { + test('should return false when the state has not changed', () => { + expect(isStoreStateDirty(mockState)).toBe(false); + }); + + test('should return true when the program has changed', () => { + expect(isStoreStateDirty(mockState)).toBe(false); + + mockState.program.name = 'Malaria Prevention'; + + expect(isStoreStateDirty(mockState)).toBe(true); + }); + + test('should return true when the programStage has changed', () => { + expect(isStoreStateDirty(mockState)).toBe(false); + + mockState.programStages[0].name = 'Stage 1'; + + expect(isStoreStateDirty(mockState)).toBe(true); + }); + + test('should return true when a programStageNotification was changed', () => { + expect(isStoreStateDirty(mockState)).toBe(false); + + mockState.programStageNotifications.selCNHPqm5g[0].name = 'Email on completion'; + + expect(isStoreStateDirty(mockState)).toBe(true); + }); + + test('should return true when a dataEntryForm was changed', () => { + expect(isStoreStateDirty(mockState)).toBe(false); + + mockState.dataEntryFormForProgramStage.selCNHPqm5g.htmlCode = ''; + + expect(isStoreStateDirty(mockState)).toBe(true); + }); + }); + + describe('getMetaDataToSend', () => { + test('should return an empty payload when nothing was updated', () => { + expect(getMetaDataToSend(mockState)).toEqual({}); + }); + + test( + 'should return the programs array with a single program when the program was updated', + () => { + mockState.program.name = 'Malaria Prevention'; + + expect(getMetaDataToSend(mockState)).toEqual({ + programs: [{ + name: 'Malaria Prevention', + notificationTemplates: [], + programStages: [], + expiryDays: 0, + completeEventsExpiryDays: 0, + version: 0, + }], + }); + } + ); + + test( + 'should return the programStage array when a programStage was updated', + () => { + mockState.programStages[0].name = 'Stage 1'; + + expect(getMetaDataToSend(mockState)).toEqual({ + programStages: [{ + id: 'selCNHPqm5g', + name: 'Stage 1', + notificationTemplates: [], + }], + }); + } + ); + + test( + 'should return the programStage and the programNotificationTemplate when a programNotificationTemplate was added', + () => { + const notification = programStageNotification.create({ id: 'pdKXh2PmaLs' }); + notification.name = 'Sms template'; + + mockState.programStages[0].notificationTemplates.add(notification); + mockState.programStageNotifications.selCNHPqm5g = [notification]; + + expect(getMetaDataToSend(mockState)).toEqual({ + programStages: [{ + id: 'selCNHPqm5g', + notificationTemplates: [ + { id: 'pdKXh2PmaLs' }, + ], + }], + programNotificationTemplates: [{ + id: 'pdKXh2PmaLs', + name: 'Sms template', + }], + }); + } + ); + }); + }); +}); diff --git a/src/EditModel/event-program/metadataimport-helpers.spec.js b/src/EditModel/event-program/__tests__/metadataimport-helpers.spec.js similarity index 82% rename from src/EditModel/event-program/metadataimport-helpers.spec.js rename to src/EditModel/event-program/__tests__/metadataimport-helpers.spec.js index 8843cd86a..b03e1babe 100644 --- a/src/EditModel/event-program/metadataimport-helpers.spec.js +++ b/src/EditModel/event-program/__tests__/metadataimport-helpers.spec.js @@ -1,4 +1,4 @@ -import { getImportStatus } from './metadataimport-helpers'; +import { getImportStatus } from '../metadataimport-helpers'; describe('MetaDataImport helpers', () => { let successfullImportResponse; @@ -131,68 +131,68 @@ describe('MetaDataImport helpers', () => { }; }); - it('should return an object', () => { - expect(getImportStatus(successfullImportResponse)).to.be.a('object'); + test('should return an object', () => { + expect(typeof getImportStatus(successfullImportResponse)).toBe('object'); }); - it('should retain the original properties on success', () => { - expect(getImportStatus(successfullImportResponse).typeReports).to.deep.equal(successfullImportResponse.typeReports); - expect(getImportStatus(successfullImportResponse).stats).to.deep.equal(successfullImportResponse.stats); - expect(getImportStatus(successfullImportResponse).importParams).to.deep.equal(successfullImportResponse.importParams); - expect(getImportStatus(successfullImportResponse).status).to.deep.equal(successfullImportResponse.status); + test('should retain the original properties on success', () => { + expect(getImportStatus(successfullImportResponse).typeReports).toEqual(successfullImportResponse.typeReports); + expect(getImportStatus(successfullImportResponse).stats).toEqual(successfullImportResponse.stats); + expect(getImportStatus(successfullImportResponse).importParams).toEqual(successfullImportResponse.importParams); + expect(getImportStatus(successfullImportResponse).status).toEqual(successfullImportResponse.status); }); - it('should retain the original properties on failure', () => { - expect(getImportStatus(unsuccessfullImportResponse).typeReports).to.deep.equal(unsuccessfullImportResponse.typeReports); - expect(getImportStatus(unsuccessfullImportResponse).stats).to.deep.equal(unsuccessfullImportResponse.stats); - expect(getImportStatus(unsuccessfullImportResponse).importParams).to.deep.equal(unsuccessfullImportResponse.importParams); - expect(getImportStatus(unsuccessfullImportResponse).status).to.deep.equal(unsuccessfullImportResponse.status); + test('should retain the original properties on failure', () => { + expect(getImportStatus(unsuccessfullImportResponse).typeReports).toEqual(unsuccessfullImportResponse.typeReports); + expect(getImportStatus(unsuccessfullImportResponse).stats).toEqual(unsuccessfullImportResponse.stats); + expect(getImportStatus(unsuccessfullImportResponse).importParams).toEqual(unsuccessfullImportResponse.importParams); + expect(getImportStatus(unsuccessfullImportResponse).status).toEqual(unsuccessfullImportResponse.status); }); describe('isOk', () => { - it('should be a function', () => { - expect(getImportStatus(successfullImportResponse).isOk).to.be.a('function'); + test('should be a function', () => { + expect(typeof getImportStatus(successfullImportResponse).isOk).toBe('function'); }); - it('should return true when the import is successful', () => { - expect(getImportStatus(successfullImportResponse).isOk()).to.be.true; + test('should return true when the import is successful', () => { + expect(getImportStatus(successfullImportResponse).isOk()).toBe(true); }); - it('should return false when the import errored', () => { - expect(getImportStatus(unsuccessfullImportResponse).isOk()).to.be.false; + test('should return false when the import errored', () => { + expect(getImportStatus(unsuccessfullImportResponse).isOk()).toBe(false); }); }); describe('typeReports', () => { - it('should have a type report for each object on success', () => { - expect(getImportStatus(successfullImportResponse).typeReports).to.have.length(1); + test('should have a type report for each object on success', () => { + expect(getImportStatus(successfullImportResponse).typeReports).toHaveLength(1); }); - it('should have a type report for each object on failure', () => { - expect(getImportStatus(unsuccessfullImportResponse).typeReports).to.have.length(2); + test('should have a type report for each object on failure', () => { + expect(getImportStatus(unsuccessfullImportResponse).typeReports).toHaveLength(2); }); }); describe('errorsPerObject', () => { - it('should be an empty array on successful import', () => { - expect(getImportStatus(successfullImportResponse).errorsPerObject).to.deep.equal([]); + test('should be an empty array on successful import', () => { + expect(getImportStatus(successfullImportResponse).errorsPerObject).toEqual([]); }); - it('should contain an object for each object that has errors', () => { - expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject).to.have.length(2); + test('should contain an object for each object that has errors', () => { + expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject).toHaveLength(2); }); - it('should have the id for the program object', () => { - expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject[0].id).to.equal('MslrqljzDcW'); + test('should have the id for the program object', () => { + expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject[0].id).toBe('MslrqljzDcW'); }); // TODO: The id a categoryOption can not be retrieved in a reliable way xit('should have the id for the categoryOption object', () => { - expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject[1].id).to.equal('Jg6u9usyKgl'); + expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject[1].id).toBe('Jg6u9usyKgl'); }); - it('should have the errors group by property', () => { - expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject[1].errors).to.deep.equal({ + test('should have the errors group by property', () => { + expect(getImportStatus(unsuccessfullImportResponse).errorsPerObject[1].errors).toEqual({ code: [{ message: 'Property `code` with value `2222332` on object 234234 [Jg6u9usyKgl] (DataElementCategoryOption) already exists on object ucZp3aEMfR5.', mainKlass: 'org.hisp.dhis.dataelement.DataElementCategoryOption', diff --git a/src/EditModel/event-program/__tests__/reducers.spec.js b/src/EditModel/event-program/__tests__/reducers.spec.js new file mode 100644 index 000000000..8126130b5 --- /dev/null +++ b/src/EditModel/event-program/__tests__/reducers.spec.js @@ -0,0 +1,123 @@ +import reducer from '../reducers'; +import * as actions from '../actions'; +import { STEPPER_RESET_ACTIVE_STEP } from '../../actions'; +import * as iterator from '../../stepper/stepIterator'; + +describe('Event Program', () => { + beforeAll(() => { + iterator.next = jest.fn(); + iterator.previous = jest.fn(); + iterator.first = jest.fn(); + }); + + beforeEach(() => { + jest.resetAllMocks(); + }); + + afterAll(() => { + jest.clearAllMocks(); + }); + + describe('combined reducer', () => { + test('should return the event program state', () => { + const stepKey = 'shuffle'; + iterator.first.mockReturnValue(stepKey); + + const actualState = reducer(undefined, {}); + + const expectedState = { + step: { + activeStep: stepKey, + }, + stageNotifications: { + isDeleting: false, + }, + }; + + expect(actualState).toEqual(expectedState); + }); + }); + + describe('stepper reducer', () => { + test('should return the default state', () => { + const stepKey = 'sprint'; + iterator.first.mockReturnValue(stepKey); + + const expectedStepState = { + activeStep: stepKey, + }; + + const actualState = reducer(undefined, {}); + + expect(actualState.step).toEqual(expectedStepState); + }); + + describe('when receiving actions', () => { + const initialState = { + step: { + activeStep: 'slow-walk', + }, + }; + + test('should change the activeStep when receiving an EVENT_PROGRAM_STEP_CHANGE action', () => { + const expectedStepKey = 'hop'; + + const expectedState = { + activeStep: expectedStepKey, + }; + + const actualState = reducer(initialState, { + type: actions.EVENT_PROGRAM_STEP_CHANGE, + payload: expectedStepKey, + }); + + expect(actualState.step).toEqual(expectedState); + }); + + test('should request the next step when receiving an EVENT_PROGRAM_STEP_NEXT action', () => { + const expectedStepKey = 'march'; + iterator.next.mockReturnValue(expectedStepKey); + + const expectedState = { + activeStep: expectedStepKey, + }; + + const actualState = reducer(initialState, { type: actions.EVENT_PROGRAM_STEP_NEXT }); + + expect(iterator.next).toHaveBeenCalledTimes(1); + expect(iterator.previous).toHaveBeenCalledTimes(0); + expect(actualState.step).toEqual(expectedState); + }); + + test('should request the previous step when receiving an EVENT_PROGRAM_STEP_PREVIOUS action', () => { + const expectedStepKey = 'jog'; + iterator.previous.mockReturnValue(expectedStepKey); + + const expectedState = { + activeStep: expectedStepKey, + }; + + const actualState = reducer(initialState, { type: actions.EVENT_PROGRAM_STEP_PREVIOUS }); + + expect(iterator.next).toHaveBeenCalledTimes(0); + expect(iterator.previous).toHaveBeenCalledTimes(1); + expect(actualState.step).toEqual(expectedState); + }); + + test('shoud request the first step when receiving an STEPPER_RESET_ACTIVE_STEP action', () => { + const expectedStepKey = 'sprint'; + iterator.first.mockReturnValue(expectedStepKey); + + const expectedState = { + activeStep: expectedStepKey, + }; + + const actualState = reducer(initialState, { type: STEPPER_RESET_ACTIVE_STEP }); + + expect(iterator.next).toHaveBeenCalledTimes(0); + expect(iterator.previous).toHaveBeenCalledTimes(0); + expect(actualState.step).toEqual(expectedState); + }); + }); + }); +}); diff --git a/src/EditModel/event-program/__tests__/selectors.spec.js b/src/EditModel/event-program/__tests__/selectors.spec.js new file mode 100644 index 000000000..ab03f84c3 --- /dev/null +++ b/src/EditModel/event-program/__tests__/selectors.spec.js @@ -0,0 +1,29 @@ +import { activeStepSelector } from '../selectors'; + +describe('Event Program selectors', () => { + describe('activeStepSelector', () => { + test('should return the activeStep from the state', () => { + const state = { + eventProgram: { + step: { + activeStep: 'details', + }, + }, + }; + + expect(activeStepSelector(state)).toBe('details'); + }); + + test('should return undefined if step does not exist', () => { + const state = {}; + + expect(activeStepSelector(state)).toBeUndefined(); + }); + + test('should return undefined if state is undefined', () => { + let state; + + expect(activeStepSelector(state)).toBeUndefined(); + }); + }); +}); diff --git a/src/EditModel/event-program/actions.spec.js b/src/EditModel/event-program/actions.spec.js deleted file mode 100644 index ddecc01f5..000000000 --- a/src/EditModel/event-program/actions.spec.js +++ /dev/null @@ -1,116 +0,0 @@ -import * as actions from './actions'; - -describe('Event Program actions', () => { - describe('for stepper', () => { - it('should have defined the stepper constants', () => { - expect(actions.EVENT_PROGRAM_STEP_PREVIOUS).to.equal('EVENT_PROGRAM_STEP_PREVIOUS'); - expect(actions.EVENT_PROGRAM_STEP_NEXT).to.equal('EVENT_PROGRAM_STEP_NEXT'); - expect(actions.EVENT_PROGRAM_STEP_CHANGE).to.equal('EVENT_PROGRAM_STEP_CHANGE'); - }); - - it('should create the EVENT_PROGRAM_STEP_CHANGE action', () => { - expect(actions.changeStep()).to.deep.equal({ type: actions.EVENT_PROGRAM_STEP_CHANGE, payload: undefined }); - }); - - it('should use the parameter as the payload', () => { - expect(actions.changeStep('details')).to.deep.equal({ type: actions.EVENT_PROGRAM_STEP_CHANGE, payload: 'details' }); - }); - - it('should create the EVENT_PROGRAM_STEP_NEXT action', () => { - expect(actions.nextStep()).to.deep.equal({ type: actions.EVENT_PROGRAM_STEP_NEXT }); - }); - - it('should create the EVENT_PROGRAM_STEP_PREVIOUS action', () => { - expect(actions.previousStep()).to.deep.equal({ type: actions.EVENT_PROGRAM_STEP_PREVIOUS }); - }); - }); - - describe('for loading a event program', () => { - it('should have the event program load constants', () => { - expect(actions.EVENT_PROGRAM_LOAD).to.equal('EVENT_PROGRAM_LOAD'); - expect(actions.EVENT_PROGRAM_LOAD_SUCCESS).to.equal('EVENT_PROGRAM_LOAD_SUCCESS'); - expect(actions.EVENT_PROGRAM_LOAD_ERROR).to.equal('EVENT_PROGRAM_LOAD_ERROR'); - }); - - it('should create the EVENT_PROGRAM_LOAD action', () => { - expect(actions.loadEventProgram()).to.deep.equal({ type: actions.EVENT_PROGRAM_LOAD, payload: undefined }); - }); - - it('should create the EVENT_PROGRAM_LOAD_SUCCESS action', () => { - expect(actions.loadEventProgramSuccess()).to.deep.equal({ type: actions.EVENT_PROGRAM_LOAD_SUCCESS, payload: undefined }); - }); - - it('should create the EVENT_PROGRAM_LOAD_SUCCESS action', () => { - expect(actions.loadEventProgramFailure()).to.deep.equal({ type: actions.EVENT_PROGRAM_LOAD_ERROR, payload: undefined }); - }); - }); - - describe('for editing models', () => { - it('should have defined the model constants', () => { - expect(actions.MODEL_TO_EDIT_LOADED).to.equal('MODEL_TO_EDIT_LOADED'); - expect(actions.MODEL_TO_EDIT_FIELD_CHANGED).to.equal('MODEL_TO_EDIT_FIELD_CHANGED'); - }); - - it('should create the action when calling editFieldChanged', () => { - const expectedAction = { - type: 'MODEL_TO_EDIT_FIELD_CHANGED', - payload: { - field: 'name', - value: 'John', - }, - }; - - expect(actions.editFieldChanged('name', 'John')).to.deep.equal(expectedAction); - }); - }); - - describe('for saving an event program', () => { - it('should have defined the constants', () => { - expect(actions.EVENT_PROGRAM_SAVE).to.equal('EVENT_PROGRAM_SAVE'); - expect(actions.EVENT_PROGRAM_SAVE_SUCCESS).to.equal('EVENT_PROGRAM_SAVE_SUCCESS'); - expect(actions.EVENT_PROGRAM_SAVE_ERROR).to.equal('EVENT_PROGRAM_SAVE_ERROR'); - }); - - it('should create the save action when calling saveEventProgram', () => { - const expectedAction = { - type: actions.EVENT_PROGRAM_SAVE, - payload: undefined, - }; - - expect(actions.saveEventProgram()).to.deep.equal(expectedAction); - }); - - it('should create the save success action when calling saveEventProgramSuccess', () => { - const expectedAction = { - type: actions.EVENT_PROGRAM_SAVE_SUCCESS, - payload: undefined, - }; - - expect(actions.saveEventProgramSuccess()).to.deep.equal(expectedAction); - }); - - it('should create the save error action when calling saveEventProgramError', () => { - const expectedAction = { - type: actions.EVENT_PROGRAM_SAVE_ERROR, - payload: new Error('Could not load'), - }; - - expect(actions.saveEventProgramError(new Error('Could not load'))).to.deep.equal(expectedAction); - }); - }); - - describe('for notifying users', () => { - it('should defined the notification constants', () => { - expect(actions.NOTIFY_USER).to.equal('NOTIFY_USER'); - }); - - it('should create a notify user action when calling notifyUser', () => { - const expectedAction = { - type: actions.NOTIFY_USER, - payload: undefined, - }; - - expect(actions.notifyUser()).to.deep.equal(expectedAction); - }); - }); -}); diff --git a/src/EditModel/event-program/assign-data-elements/__tests__/actions.spec.js b/src/EditModel/event-program/assign-data-elements/__tests__/actions.spec.js new file mode 100644 index 000000000..af2ef6062 --- /dev/null +++ b/src/EditModel/event-program/assign-data-elements/__tests__/actions.spec.js @@ -0,0 +1,108 @@ +import * as actions from '../actions'; + +describe('Assignment of data elements', () => { + describe('adding data elements', () => { + test('should have the constant PROGRAM_STAGE_DATA_ELEMENTS_REMOVE', () => { + expect(actions.PROGRAM_STAGE_DATA_ELEMENTS_ADD).toBe('PROGRAM_STAGE_DATA_ELEMENTS_ADD'); + }); + + test('should have the addDataElementsToStage action creator', () => { + expect(typeof actions.addDataElementsToStage).toBe('function'); + }); + + test('should return the correct action from addDataElementsToStage', () => { + expect(actions.addDataElementsToStage({ + programStage: 'd9wIqlzSMgE', + dataElements: ['pTo4uMt3xur', 'qrur9Dvnyt5'], + })).toEqual({ + type: 'PROGRAM_STAGE_DATA_ELEMENTS_ADD', + payload: { + programStage: 'd9wIqlzSMgE', + dataElements: ['pTo4uMt3xur', 'qrur9Dvnyt5'], + }, + }); + }); + }); + + describe('removing data elements', () => { + test('should have the constant PROGRAM_STAGE_DATA_ELEMENTS_REMOVE', () => { + expect(actions.PROGRAM_STAGE_DATA_ELEMENTS_REMOVE).toBe('PROGRAM_STAGE_DATA_ELEMENTS_REMOVE'); + }); + + test('should have the removeDataElementsFromStage action creator', () => { + expect(typeof actions.removeDataElementsFromStage).toBe('function'); + }); + + test( + 'should return the correct action from removeDataElementsFromStage', + () => { + expect(actions.removeDataElementsFromStage(['pTo4uMt3xur', 'qrur9Dvnyt5'])).toEqual({ + type: 'PROGRAM_STAGE_DATA_ELEMENTS_REMOVE', + payload: ['pTo4uMt3xur', 'qrur9Dvnyt5'], + }); + } + ); + }); + + test( + 'should have the constant PROGRAM_STAGE_DATA_ELEMENTS_ADDREMOVE_COMPLETE', + () => { + expect(actions.PROGRAM_STAGE_DATA_ELEMENTS_ADDREMOVE_COMPLETE).toBe('PROGRAM_STAGE_DATA_ELEMENTS_ADDREMOVE_COMPLETE'); + } + ); + + describe('editing of program stage data element', () => { + test('should have the required constants', () => { + expect(actions.PROGRAM_STAGE_DATA_ELEMENT_EDIT).toBe('PROGRAM_STAGE_DATA_ELEMENT_EDIT'); + expect(actions.PROGRAM_STAGE_DATA_ELEMENT_EDIT_COMPLETE).toBe('PROGRAM_STAGE_DATA_ELEMENTS_EDIT_COMPLETE'); + }); + + test( + 'should have the action creator for PROGRAM_STAGE_DATA_ELEMENT_EDIT', + () => { + const programStageDataElement = { + lastUpdated: '2017-05-03T13:32:17.730', + id: 'd9wIqlzSMgE', + created: '2016-04-01T15:07:12.695', + displayInReports: true, + externalAccess: false, + renderOptionsAsRadio: false, + allowFutureDate: false, + compulsory: true, + allowProvidedElsewhere: false, + sortOrder: 0, + lastUpdatedBy: { id: 'xE7jOejl9FI' }, + programStage: { id: 'pTo4uMt3xur' }, + dataElement: { id: 'qrur9Dvnyt5' }, + translations: [], + userGroupAccesses: [], + attributeValues: [], + userAccesses: [], + }; + + expect(actions.editProgramStageDataElement(programStageDataElement)).toEqual({ + type: actions.PROGRAM_STAGE_DATA_ELEMENT_EDIT, + payload: { + lastUpdated: '2017-05-03T13:32:17.730', + id: 'd9wIqlzSMgE', + created: '2016-04-01T15:07:12.695', + displayInReports: true, + externalAccess: false, + renderOptionsAsRadio: false, + allowFutureDate: false, + compulsory: true, + allowProvidedElsewhere: false, + sortOrder: 0, + lastUpdatedBy: { id: 'xE7jOejl9FI' }, + programStage: { id: 'pTo4uMt3xur' }, + dataElement: { id: 'qrur9Dvnyt5' }, + translations: [], + userGroupAccesses: [], + attributeValues: [], + userAccesses: [], + }, + }); + } + ); + }); +}); diff --git a/src/EditModel/event-program/assign-data-elements/epics.spec.js b/src/EditModel/event-program/assign-data-elements/__tests__/epics.spec.js similarity index 78% rename from src/EditModel/event-program/assign-data-elements/epics.spec.js rename to src/EditModel/event-program/assign-data-elements/__tests__/epics.spec.js index 992236fd7..8b2f5a7ec 100644 --- a/src/EditModel/event-program/assign-data-elements/epics.spec.js +++ b/src/EditModel/event-program/assign-data-elements/__tests__/epics.spec.js @@ -1,8 +1,12 @@ import { ActionsObservable } from 'redux-observable'; import Store from 'd2-ui/lib/store/Store'; -import { PROGRAM_STAGE_DATA_ELEMENTS_ADD, PROGRAM_STAGE_DATA_ELEMENTS_REMOVE, PROGRAM_STAGE_DATA_ELEMENT_EDIT } from './actions'; -import createEpicsForStore from './epics'; import { isValidUid } from 'd2/lib/uid'; +import { + PROGRAM_STAGE_DATA_ELEMENTS_ADD, + PROGRAM_STAGE_DATA_ELEMENTS_REMOVE, + PROGRAM_STAGE_DATA_ELEMENT_EDIT, +} from '../actions'; +import createEpicsForStore from '../epics'; describe('Assign data elements epics', () => { const createActionStreamFor = action => ActionsObservable.of(action); @@ -61,7 +65,7 @@ describe('Assign data elements epics', () => { }); describe('adding new data elements to the program stage', () => { - it('should add a single programStageDataElement', (done) => { + test('should add a single programStageDataElement', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENTS_ADD, payload: { @@ -73,11 +77,11 @@ describe('Assign data elements epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.getState().programStages[0].programStageDataElements).to.have.length(3); + expect(store.getState().programStages[0].programStageDataElements).toHaveLength(3); const newlyAddedDataElement = store.getState().programStages[0].programStageDataElements[2]; - expect(isValidUid(newlyAddedDataElement.id)).to.be.true; - expect(newlyAddedDataElement.dataElement).to.deep.equal({ + expect(isValidUid(newlyAddedDataElement.id)).toBe(true); + expect(newlyAddedDataElement.dataElement).toEqual({ id: 'eMyVanycQSC', }); done(); @@ -85,7 +89,7 @@ describe('Assign data elements epics', () => { done); }); - it('should add multiple programStageDataElement', (done) => { + test('should add multiple programStageDataElement', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENTS_ADD, payload: { @@ -97,17 +101,17 @@ describe('Assign data elements epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.getState().programStages[0].programStageDataElements).to.have.length(4); + expect(store.getState().programStages[0].programStageDataElements).toHaveLength(4); const newlyAddedDataElementOne = store.getState().programStages[0].programStageDataElements[2]; const newlyAddedDataElementTwo = store.getState().programStages[0].programStageDataElements[3]; - expect(isValidUid(newlyAddedDataElementOne.id)).to.be.true; - expect(isValidUid(newlyAddedDataElementTwo.id)).to.be.true; + expect(isValidUid(newlyAddedDataElementOne.id)).toBe(true); + expect(isValidUid(newlyAddedDataElementTwo.id)).toBe(true); - expect(newlyAddedDataElementOne.dataElement).to.deep.equal({ + expect(newlyAddedDataElementOne.dataElement).toEqual({ id: 'eMyVanycQSC', }); - expect(newlyAddedDataElementTwo.dataElement).to.deep.equal({ + expect(newlyAddedDataElementTwo.dataElement).toEqual({ id: 'd68jOejl9FI', }); done(); @@ -116,7 +120,7 @@ describe('Assign data elements epics', () => { ); }); - it('should emit the state from the store', (done) => { + test('should emit the state from the store', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENTS_ADD, payload: { @@ -125,13 +129,13 @@ describe('Assign data elements epics', () => { }, }; - const storeSubscriptionSpy = sinon.spy(); + const storeSubscriptionSpy = jest.fn(); store.subscribe(storeSubscriptionSpy); epic(createActionStreamFor(action)) .subscribe( () => { - expect(storeSubscriptionSpy).to.be.calledTwice; + expect(storeSubscriptionSpy).toHaveBeenCalledTimes(2); done(); }, done @@ -140,7 +144,7 @@ describe('Assign data elements epics', () => { }); describe('removing data elements from the program stage', () => { - it('should remove the provided data element', (done) => { + test('should remove the provided data element', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENTS_REMOVE, payload: { @@ -152,11 +156,11 @@ describe('Assign data elements epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.getState().programStages[0].programStageDataElements).to.have.length(1); + expect(store.getState().programStages[0].programStageDataElements).toHaveLength(1); const remainingDataElement = store.getState().programStages[0].programStageDataElements[0]; - expect(isValidUid(remainingDataElement.id)).to.be.true; - expect(remainingDataElement).to.deep.equal({ + expect(isValidUid(remainingDataElement.id)).toBe(true); + expect(remainingDataElement).toEqual({ lastUpdated: '2017-05-03T13:32:17.729', id: 'FKHaErzkvEF', created: '2016-04-01T15:07:12.723', @@ -181,7 +185,7 @@ describe('Assign data elements epics', () => { ); }); - it('should remove all the provided dataElements', (done) => { + test('should remove all the provided dataElements', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENTS_REMOVE, payload: { @@ -193,14 +197,14 @@ describe('Assign data elements epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.getState().programStages[0].programStageDataElements).to.have.length(0); + expect(store.getState().programStages[0].programStageDataElements).toHaveLength(0); done(); }, done ); }); - it('should emit the state from the store', (done) => { + test('should emit the state from the store', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENTS_REMOVE, payload: { @@ -209,13 +213,13 @@ describe('Assign data elements epics', () => { }, }; - const storeSubscriptionSpy = sinon.spy(); + const storeSubscriptionSpy = jest.fn(); store.subscribe(storeSubscriptionSpy); epic(createActionStreamFor(action)) .subscribe( () => { - expect(storeSubscriptionSpy).to.be.calledTwice; + expect(storeSubscriptionSpy).toHaveBeenCalledTimes(2); done(); }, done @@ -224,39 +228,14 @@ describe('Assign data elements epics', () => { }); describe('editing programStageDataElement', () => { - it('should update the programStageDataElement with the new values', (done) => { - const action = { - type: PROGRAM_STAGE_DATA_ELEMENT_EDIT, - payload: { - programStage: 'pTo4uMt3xur', - programStageDataElement: { - lastUpdated: '2017-05-03T13:32:17.730', - id: 'd9wIqlzSMgE', - created: '2016-04-01T15:07:12.695', - displayInReports: false, - externalAccess: false, - renderOptionsAsRadio: false, - allowFutureDate: false, - compulsory: false, - allowProvidedElsewhere: true, - sortOrder: 0, - lastUpdatedBy: { id: 'xE7jOejl9FI' }, - programStage: { id: 'pTo4uMt3xur' }, - dataElement: { id: 'qrur9Dvnyt5' }, - translations: [], - userGroupAccesses: [], - attributeValues: [], - userAccesses: [], - }, - }, - }; - - epic(createActionStreamFor(action)) - .subscribe( - () => { - const editedDataElement = store.getState().programStages[0].programStageDataElements[0]; - - expect(editedDataElement).to.deep.equal({ + test( + 'should update the programStageDataElement with the new values', + (done) => { + const action = { + type: PROGRAM_STAGE_DATA_ELEMENT_EDIT, + payload: { + programStage: 'pTo4uMt3xur', + programStageDataElement: { lastUpdated: '2017-05-03T13:32:17.730', id: 'd9wIqlzSMgE', created: '2016-04-01T15:07:12.695', @@ -274,14 +253,42 @@ describe('Assign data elements epics', () => { userGroupAccesses: [], attributeValues: [], userAccesses: [], - }); - done(); + }, }, - done - ); - }); + }; + + epic(createActionStreamFor(action)) + .subscribe( + () => { + const editedDataElement = store.getState().programStages[0].programStageDataElements[0]; + + expect(editedDataElement).toEqual({ + lastUpdated: '2017-05-03T13:32:17.730', + id: 'd9wIqlzSMgE', + created: '2016-04-01T15:07:12.695', + displayInReports: false, + externalAccess: false, + renderOptionsAsRadio: false, + allowFutureDate: false, + compulsory: false, + allowProvidedElsewhere: true, + sortOrder: 0, + lastUpdatedBy: { id: 'xE7jOejl9FI' }, + programStage: { id: 'pTo4uMt3xur' }, + dataElement: { id: 'qrur9Dvnyt5' }, + translations: [], + userGroupAccesses: [], + attributeValues: [], + userAccesses: [], + }); + done(); + }, + done + ); + } + ); - it('should not modify the other dataElements', (done) => { + test('should not modify the other dataElements', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENT_EDIT, payload: { @@ -313,7 +320,7 @@ describe('Assign data elements epics', () => { () => { const editedDataElement = store.getState().programStages[0].programStageDataElements[1]; - expect(editedDataElement).to.deep.equal({ + expect(editedDataElement).toEqual({ lastUpdated: '2017-05-03T13:32:17.729', id: 'FKHaErzkvEF', created: '2016-04-01T15:07:12.723', @@ -338,7 +345,7 @@ describe('Assign data elements epics', () => { ); }); - it('should emit the state from the store', (done) => { + test('should emit the state from the store', (done) => { const action = { type: PROGRAM_STAGE_DATA_ELEMENT_EDIT, payload: { @@ -365,13 +372,13 @@ describe('Assign data elements epics', () => { }, }; - const storeSubscriptionSpy = sinon.spy(); + const storeSubscriptionSpy = jest.fn(); store.subscribe(storeSubscriptionSpy); epic(createActionStreamFor(action)) .subscribe( () => { - expect(storeSubscriptionSpy).to.be.calledTwice; + expect(storeSubscriptionSpy).toHaveBeenCalledTimes(2); done(); }, done diff --git a/src/EditModel/event-program/assign-data-elements/actions.spec.js b/src/EditModel/event-program/assign-data-elements/actions.spec.js deleted file mode 100644 index 9c4813e09..000000000 --- a/src/EditModel/event-program/assign-data-elements/actions.spec.js +++ /dev/null @@ -1,99 +0,0 @@ -import * as actions from './actions'; - -describe('Assignment of data elements', () => { - describe('adding data elements', () => { - it('should have the constant PROGRAM_STAGE_DATA_ELEMENTS_REMOVE', () => { - expect(actions.PROGRAM_STAGE_DATA_ELEMENTS_ADD).to.equal('PROGRAM_STAGE_DATA_ELEMENTS_ADD'); - }); - - it('should have the addDataElementsToStage action creator', () => { - expect(actions.addDataElementsToStage).to.be.a('function'); - }); - - it('should return the correct action from addDataElementsToStage', () => { - expect(actions.addDataElementsToStage({ - programStage: 'd9wIqlzSMgE', - dataElements: ['pTo4uMt3xur', 'qrur9Dvnyt5'], - })).to.deep.equal({ - type: 'PROGRAM_STAGE_DATA_ELEMENTS_ADD', - payload: { - programStage: 'd9wIqlzSMgE', - dataElements: ['pTo4uMt3xur', 'qrur9Dvnyt5'], - }, - }); - }); - }); - - describe('removing data elements', () => { - it('should have the constant PROGRAM_STAGE_DATA_ELEMENTS_REMOVE', () => { - expect(actions.PROGRAM_STAGE_DATA_ELEMENTS_REMOVE).to.equal('PROGRAM_STAGE_DATA_ELEMENTS_REMOVE'); - }); - - it('should have the removeDataElementsFromStage action creator', () => { - expect(actions.removeDataElementsFromStage).to.be.a('function'); - }); - - it('should return the correct action from removeDataElementsFromStage', () => { - expect(actions.removeDataElementsFromStage(['pTo4uMt3xur', 'qrur9Dvnyt5'])).to.deep.equal({ - type: 'PROGRAM_STAGE_DATA_ELEMENTS_REMOVE', - payload: ['pTo4uMt3xur', 'qrur9Dvnyt5'], - }); - }); - }); - - it('should have the constant PROGRAM_STAGE_DATA_ELEMENTS_ADDREMOVE_COMPLETE', () => { - expect(actions.PROGRAM_STAGE_DATA_ELEMENTS_ADDREMOVE_COMPLETE).to.equal('PROGRAM_STAGE_DATA_ELEMENTS_ADDREMOVE_COMPLETE'); - }); - - describe('editing of program stage data element', () => { - it('should have the required constants', () => { - expect(actions.PROGRAM_STAGE_DATA_ELEMENT_EDIT).to.equal('PROGRAM_STAGE_DATA_ELEMENT_EDIT'); - expect(actions.PROGRAM_STAGE_DATA_ELEMENT_EDIT_COMPLETE).to.equal('PROGRAM_STAGE_DATA_ELEMENTS_EDIT_COMPLETE'); - }); - - it('should have the action creator for PROGRAM_STAGE_DATA_ELEMENT_EDIT', () => { - const programStageDataElement = { - lastUpdated: '2017-05-03T13:32:17.730', - id: 'd9wIqlzSMgE', - created: '2016-04-01T15:07:12.695', - displayInReports: true, - externalAccess: false, - renderOptionsAsRadio: false, - allowFutureDate: false, - compulsory: true, - allowProvidedElsewhere: false, - sortOrder: 0, - lastUpdatedBy: { id: 'xE7jOejl9FI' }, - programStage: { id: 'pTo4uMt3xur' }, - dataElement: { id: 'qrur9Dvnyt5' }, - translations: [], - userGroupAccesses: [], - attributeValues: [], - userAccesses: [], - }; - - expect(actions.editProgramStageDataElement(programStageDataElement)).to.deep.equal({ - type: actions.PROGRAM_STAGE_DATA_ELEMENT_EDIT, - payload: { - lastUpdated: '2017-05-03T13:32:17.730', - id: 'd9wIqlzSMgE', - created: '2016-04-01T15:07:12.695', - displayInReports: true, - externalAccess: false, - renderOptionsAsRadio: false, - allowFutureDate: false, - compulsory: true, - allowProvidedElsewhere: false, - sortOrder: 0, - lastUpdatedBy: { id: 'xE7jOejl9FI' }, - programStage: { id: 'pTo4uMt3xur' }, - dataElement: { id: 'qrur9Dvnyt5' }, - translations: [], - userGroupAccesses: [], - attributeValues: [], - userAccesses: [], - }, - }); - }); - }); -}); diff --git a/src/EditModel/event-program/eventProgramStore.spec.js b/src/EditModel/event-program/eventProgramStore.spec.js deleted file mode 100644 index 6fea88c70..000000000 --- a/src/EditModel/event-program/eventProgramStore.spec.js +++ /dev/null @@ -1,178 +0,0 @@ -import { Observable } from 'rxjs'; -import store, { isStoreStateDirty, getMetaDataToSend } from './eventProgramStore'; -import ModelDefinition from 'd2/lib/model/ModelDefinition'; -import ModelDefinitions from 'd2/lib/model/ModelDefinitions'; -import programSchema from '../../../test/fixtures/schemas/program'; -import programStageSchema from '../../../test/fixtures/schemas/programStage'; -import programNotificationTemplateSchema from '../../../test/fixtures/schemas/programNotificationTemplate'; -import dataEntryFormSchema from '../../../test/fixtures/schemas/dataEntryForm'; -import { noop, memoize } from 'lodash/fp'; - -describe('Event Program Store', () => { - let mockState; - let program; - let programStage; - let dataEntryForm; - let programStageNotification; - let modelDefinitions; - - before(() => { - // Mock fetch - global.fetch = noop; - - program = ModelDefinition.createFromSchema(programSchema); - programStage = ModelDefinition.createFromSchema(programStageSchema); - programStageNotification = ModelDefinition.createFromSchema(programNotificationTemplateSchema); - dataEntryForm = ModelDefinition.createFromSchema(dataEntryFormSchema); - - modelDefinitions = ModelDefinitions.getModelDefinitions(); - - // Only add the modelDefs when they have not yet been added (This is kind of funky due to ModelDefinitions being a singleton) - modelDefinitions.program || modelDefinitions.add(program); - modelDefinitions.programStage || modelDefinitions.add(programStage); - modelDefinitions.programNotificationTemplate || modelDefinitions.add(programStageNotification); - modelDefinitions.programNotificationTemplate || modelDefinitions.add(dataEntryForm); - }); - - beforeEach(() => { - mockState = { - program: program.create(), - programStages: [programStage.create({ id: 'selCNHPqm5g', notificationTemplates: [] })], - programStageNotifications: { - selCNHPqm5g: [ - programStageNotification.create(), - ], - }, - dataEntryFormForProgramStage: { - selCNHPqm5g: dataEntryForm.create(), - }, - }; - - store.setState(mockState); - }); - - after(() => { - delete global.fetch; - }); - - it('should be an Observable', () => { - expect(store).to.be.instanceof(Observable); - }); - - it('should return the current state when requesting it', () => { - expect(store.getState()).to.deep.equal(mockState); - }); - - it('should emit the status after subscribing to it', (done) => { - store - .take(1) - .do(state => expect(state).to.deep.equal(mockState)) - .subscribe(() => done(), done); - }); - - it('should not accept invalid properties for the state', () => { - expect(() => store.setState({ name: 'John' })).to.throw('You are attempting to set an invalid state onto the eventProgramStore'); - }); - - it('should throw if the passed state is not an object', () => { - expect(() => store.setState()).to.throw('You are attempting to set a state that is a non object'); - }); - - xit('should merge the state with the old state', () => { - - }); - - describe('helpers', () => { - describe('isStoreStateDirty', () => { - it('should return false when the state has not changed', () => { - expect(isStoreStateDirty(mockState)).to.be.false; - }); - - it('should return true when the program has changed', () => { - expect(isStoreStateDirty(mockState)).to.be.false; - - mockState.program.name = 'Malaria Prevention'; - - expect(isStoreStateDirty(mockState)).to.be.true; - }); - - it('should return true when the programStage has changed', () => { - expect(isStoreStateDirty(mockState)).to.be.false; - - mockState.programStages[0].name = 'Stage 1'; - - expect(isStoreStateDirty(mockState)).to.be.true; - }); - - it('should return true when a programStageNotification was changed', () => { - expect(isStoreStateDirty(mockState)).to.be.false; - - mockState.programStageNotifications.selCNHPqm5g[0].name = 'Email on completion'; - - expect(isStoreStateDirty(mockState)).to.be.true; - }); - - it('should return true when a dataEntryForm was changed', () => { - expect(isStoreStateDirty(mockState)).to.be.false; - - mockState.dataEntryFormForProgramStage.selCNHPqm5g.htmlCode = ''; - - expect(isStoreStateDirty(mockState)).to.be.true; - }); - }); - - describe('getMetaDataToSend', () => { - it('should return an empty payload when nothing was updated', () => { - expect(getMetaDataToSend(mockState)).to.deep.equal({}); - }); - - it('should return the programs array with a single program when the program was updated', () => { - mockState.program.name = 'Malaria Prevention'; - - expect(getMetaDataToSend(mockState)).to.deep.equal({ - programs: [{ - name: 'Malaria Prevention', - notificationTemplates: [], - programStages: [], - expiryDays: 0, - completeEventsExpiryDays: 0, - version: 0, - }], - }); - }); - - it('should return the programStage array when a programStage was updated', () => { - mockState.programStages[0].name = 'Stage 1'; - - expect(getMetaDataToSend(mockState)).to.deep.equal({ - programStages: [{ - id: 'selCNHPqm5g', - name: 'Stage 1', - notificationTemplates: [], - }], - }); - }); - - it('should return the programStage and the programNotificationTemplate when a programNotificationTemplate was added', () => { - const notification = programStageNotification.create({ id: 'pdKXh2PmaLs' }); - notification.name = 'Sms template'; - - mockState.programStages[0].notificationTemplates.add(notification); - mockState.programStageNotifications.selCNHPqm5g = [notification]; - - expect(getMetaDataToSend(mockState)).to.deep.equal({ - programStages: [{ - id: 'selCNHPqm5g', - notificationTemplates: [ - { id: 'pdKXh2PmaLs' }, - ], - }], - programNotificationTemplates: [{ - id: 'pdKXh2PmaLs', - name: 'Sms template', - }], - }); - }); - }); - }); -}); diff --git a/src/EditModel/event-program/reducers.spec.js b/src/EditModel/event-program/reducers.spec.js deleted file mode 100644 index 9e9fe8a17..000000000 --- a/src/EditModel/event-program/reducers.spec.js +++ /dev/null @@ -1,134 +0,0 @@ -/* global sinon, expect */ -/* eslint-disable no-unused-expressions */ - -import reducer from './reducers'; -import * as actions from './actions'; -import { STEPPER_RESET_ACTIVE_STEP } from '../actions'; -import * as iterator from '../stepper/stepIterator'; - -describe('Event Program', () => { - let sandbox; - let nextStub; - let previousStub; - let firstStub; - - before(() => { - sandbox = sinon.sandbox.create(); - nextStub = sandbox.stub(iterator, 'next'); - previousStub = sandbox.stub(iterator, 'previous'); - firstStub = sandbox.stub(iterator, 'first'); - }); - - beforeEach(() => { - nextStub.reset(); - previousStub.reset(); - firstStub.reset(); - }); - - after(() => { - sandbox.restore(); - }); - - describe('combined reducer', () => { - it('should return the event program state', () => { - const stepKey = 'shuffle'; - firstStub.returns(stepKey); - - const actualState = reducer(undefined, {}); - - const expectedState = { - step: { - activeStep: stepKey, - }, - stageNotifications: { - isDeleting: false, - }, - }; - - expect(actualState).to.deep.equal(expectedState); - }); - }); - - describe('stepper reducer', () => { - it('should return the default state', () => { - const stepKey = 'sprint'; - firstStub.returns(stepKey); - - const expectedStepState = { - activeStep: stepKey, - }; - - const actualState = reducer(undefined, {}); - - expect(actualState.step).to.deep.equal(expectedStepState); - }); - - describe('when receiving actions', () => { - const initialState = { - step: { - activeStep: 'slow-walk', - }, - }; - - it('should change the activeStep when receiving an EVENT_PROGRAM_STEP_CHANGE action', () => { - const expectedStepKey = 'hop'; - - const expectedState = { - activeStep: expectedStepKey, - }; - - const actualState = reducer(initialState, { - type: actions.EVENT_PROGRAM_STEP_CHANGE, - payload: expectedStepKey, - }); - - expect(actualState.step).to.deep.equal(expectedState); - }); - - it('should request the next step when receiving an EVENT_PROGRAM_STEP_NEXT action', () => { - const expectedStepKey = 'march'; - nextStub.returns(expectedStepKey); - - const expectedState = { - activeStep: expectedStepKey, - }; - - const actualState = reducer(initialState, { type: actions.EVENT_PROGRAM_STEP_NEXT }); - - expect(nextStub).to.have.been.called; - expect(previousStub).not.to.have.been.called; - expect(actualState.step).to.deep.equal(expectedState); - }); - - it('should request the previous step when receiving an EVENT_PROGRAM_STEP_PREVIOUS action', () => { - const expectedStepKey = 'jog'; - previousStub.returns(expectedStepKey); - - const expectedState = { - activeStep: expectedStepKey, - }; - - const actualState = reducer(initialState, { type: actions.EVENT_PROGRAM_STEP_PREVIOUS }); - - expect(nextStub).not.to.have.been.called; - expect(previousStub).to.have.been.called; - expect(actualState.step).to.deep.equal(expectedState); - }); - - it('shoud request the first step when receiving an STEPPER_RESET_ACTIVE_STEP action', () => { - const expectedStepKey = 'sprint'; - firstStub.returns(expectedStepKey); - - const expectedState = { - activeStep: expectedStepKey, - }; - - const actualState = reducer(initialState, { type: STEPPER_RESET_ACTIVE_STEP }); - - expect(nextStub).not.to.have.been.called; - expect(previousStub).not.to.have.been.called; - expect(actualState.step).to.deep.equal(expectedState); - }); - }); - }); -}); diff --git a/src/EditModel/event-program/selectors.spec.js b/src/EditModel/event-program/selectors.spec.js deleted file mode 100644 index a2a240305..000000000 --- a/src/EditModel/event-program/selectors.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import { activeStepSelector } from './selectors'; - -describe('Event Program selectors', () => { - describe('activeStepSelector', () => { - it('should return the activeStep from the state', () => { - const state = { - eventProgram: { - step: { - activeStep: 'details', - }, - }, - }; - - expect(activeStepSelector(state)).to.equal('details'); - }); - - it('should return undefined if step does not exist', () => { - const state = {}; - - expect(activeStepSelector(state)).to.be.undefined; - }); - - it('should return undefined if state is undefined', () => { - let state; - - expect(activeStepSelector(state)).to.be.undefined; - }); - }); -}); diff --git a/src/EditModel/program-indicator/__tests__/actions.spec.js b/src/EditModel/program-indicator/__tests__/actions.spec.js new file mode 100644 index 000000000..432173250 --- /dev/null +++ b/src/EditModel/program-indicator/__tests__/actions.spec.js @@ -0,0 +1,122 @@ +import * as actions from '../actions'; + +describe('Program indicator actions', () => { + describe('for stepper', () => { + test('should have defined the stepper constants', () => { + expect(actions.PROGRAM_INDICATOR_STEP_PREVIOUS).toBe('PROGRAM_INDICATOR_STEP_PREVIOUS'); + expect(actions.PROGRAM_INDICATOR_STEP_NEXT).toBe('PROGRAM_INDICATOR_STEP_NEXT'); + expect(actions.PROGRAM_INDICATOR_STEP_CHANGE).toBe('PROGRAM_INDICATOR_STEP_CHANGE'); + }); + + test('should create the PROGRAM_INDICATOR_STEP_CHANGE action', () => { + expect(actions.changeStep()).toEqual({ type: actions.PROGRAM_INDICATOR_STEP_CHANGE, payload: undefined }); + }); + + test('should use the parameter as the payload', () => { + expect(actions.changeStep('details')).toEqual({ type: actions.PROGRAM_INDICATOR_STEP_CHANGE, payload: 'details' }); + }); + + test('should create the PROGRAM_INDICATOR_STEP_NEXT action', () => { + expect(actions.nextStep()).toEqual({ type: actions.PROGRAM_INDICATOR_STEP_NEXT }); + }); + + test('should create the PROGRAM_INDICATOR_STEP_PREVIOUS action', () => { + expect(actions.previousStep()).toEqual({ type: actions.PROGRAM_INDICATOR_STEP_PREVIOUS }); + }); + }); + + describe('for loading a program indicator', () => { + test('should have the program indicator load constants', () => { + expect(actions.PROGRAM_INDICATOR_LOAD).toBe('PROGRAM_INDICATOR_LOAD'); + expect(actions.PROGRAM_INDICATOR_LOAD_SUCCESS).toBe('PROGRAM_INDICATOR_LOAD_SUCCESS'); + expect(actions.PROGRAM_INDICATOR_LOAD_ERROR).toBe('PROGRAM_INDICATOR_LOAD_ERROR'); + }); + + test('should create the PROGRAM_INDICATOR_LOAD action', () => { + expect(actions.loadProgramIndicator()).toEqual({ type: actions.PROGRAM_INDICATOR_LOAD, payload: undefined }); + }); + + test('should create the PROGRAM_INDICATOR_LOAD_SUCCESS action', () => { + expect(actions.loadProgramIndicatorSuccess()).toEqual({ type: actions.PROGRAM_INDICATOR_LOAD_SUCCESS, payload: undefined }); + }); + + test('should create the PROGRAM_INDICATOR_LOAD_SUCCESS action', () => { + expect(actions.loadProgramIndicatorFailure()).toEqual({ type: actions.PROGRAM_INDICATOR_LOAD_ERROR, payload: undefined }); + }); + }); + + describe('for editing models', () => { + test('should have defined the model constants', () => { + expect(actions.PROGRAM_INDICATOR_LOAD).toBe('PROGRAM_INDICATOR_LOAD'); + expect(actions.PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED).toBe('PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED'); + }); + + test('should create the action when calling editFieldChanged', () => { + const expectedAction = { + type: 'PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED', + payload: { + field: 'name', + value: 'John', + }, + }; + + expect(actions.editFieldChanged('name', 'John')).toEqual(expectedAction); + }); + }); + + describe('for saving an program indicator', () => { + test('should have defined the constants', () => { + expect(actions.PROGRAM_INDICATOR_SAVE).toBe('PROGRAM_INDICATOR_SAVE'); + expect(actions.PROGRAM_INDICATOR_SAVE_SUCCESS).toBe('PROGRAM_INDICATOR_SAVE_SUCCESS'); + expect(actions.PROGRAM_INDICATOR_SAVE_ERROR).toBe('PROGRAM_INDICATOR_SAVE_ERROR'); + }); + + test('should create the save action when calling saveProgramIndicator', () => { + const expectedAction = { + type: actions.PROGRAM_INDICATOR_SAVE, + payload: undefined, + }; + + expect(actions.saveProgramIndicator()).toEqual(expectedAction); + }); + + test( + 'should create the save success action when calling saveProgramIndicatorSuccess', + () => { + const expectedAction = { + type: actions.PROGRAM_INDICATOR_SAVE_SUCCESS, + payload: undefined, + }; + + expect(actions.saveProgramIndicatorSuccess()).toEqual(expectedAction); + } + ); + + test( + 'should create the save error action when calling saveProgramIndicatorError', + () => { + const expectedAction = { + type: actions.PROGRAM_INDICATOR_SAVE_ERROR, + payload: new Error('Could not load'), + }; + + expect(actions.saveProgramIndicatorError(new Error('Could not load'))).toEqual(expectedAction); + } + ); + }); + + describe('for notifying users', () => { + test('should defined the notification constants', () => { + expect(actions.NOTIFY_USER).toBe('NOTIFY_USER'); + }); + + test('should create a notify user action when calling notifyUser', () => { + const expectedAction = { + type: actions.NOTIFY_USER, + payload: undefined, + }; + + expect(actions.notifyUser()).toEqual(expectedAction); + }); + }); +}); diff --git a/src/EditModel/program-indicator/epics.spec.js b/src/EditModel/program-indicator/__tests__/epics.spec.js similarity index 58% rename from src/EditModel/program-indicator/epics.spec.js rename to src/EditModel/program-indicator/__tests__/epics.spec.js index b45aedf20..642f6a730 100644 --- a/src/EditModel/program-indicator/epics.spec.js +++ b/src/EditModel/program-indicator/__tests__/epics.spec.js @@ -1,8 +1,8 @@ import { ActionsObservable } from 'redux-observable'; import Store from 'd2-ui/lib/store/Store'; -import { PROGRAM_INDICATOR_LOAD, PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED } from './actions'; -import * as epics from './epics'; import * as d2 from 'd2/lib/d2'; +import { PROGRAM_INDICATOR_LOAD, PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED } from '../actions'; +import * as epics from '../epics'; describe('Program indicator epics', () => { const createActionStreamFor = action => ActionsObservable.of(action); @@ -11,13 +11,13 @@ describe('Program indicator epics', () => { let mockD2; beforeEach(() => { - sinon.stub(d2, 'getInstance'); + d2.getInstance = jest.fn(); mockD2 = { models: { programIndicator: { - create: sinon.stub().returns(Promise.resolve({})), - get: sinon.stub().returns(Promise.resolve({ + create: jest.fn().mockReturnValue(Promise.resolve({})), + get: jest.fn().mockReturnValue(Promise.resolve({ id: 'pTo4uMt3xur', name: 'Age at visit - calc from days', })), @@ -25,15 +25,15 @@ describe('Program indicator epics', () => { }, }; - d2.getInstance.returns(Promise.resolve(mockD2)); + d2.getInstance.mockReturnValue(Promise.resolve(mockD2)); store = Store.create(); - sinon.spy(store, 'setState'); + jest.spyOn(store, 'setState'); }); afterEach(() => { - d2.getInstance.restore(); + jest.resetAllMocks(); }); describe('programIndicatorLoad', () => { @@ -43,27 +43,30 @@ describe('Program indicator epics', () => { epic = epics.programIndicatorLoad(store); }); - it('should load the requested programIndicstor by id from the api', (done) => { - const action = { - type: PROGRAM_INDICATOR_LOAD, - payload: { - id: 'pTo4uMt3xur', - }, - }; + test( + 'should load the requested programIndicstor by id from the api', + (done) => { + const action = { + type: PROGRAM_INDICATOR_LOAD, + payload: { + id: 'pTo4uMt3xur', + }, + }; - epic(createActionStreamFor(action)) - .subscribe( - () => { - const fieldFilters = ':all,attributeValues[:all,attribute[id,name,displayName]],program[id,displayName,programType,programTrackedEntityAttributes[id,trackedEntityAttribute[id,displayName,valueType]]]'; + epic(createActionStreamFor(action)) + .subscribe( + () => { + const fieldFilters = ':all,attributeValues[:all,attribute[id,name,displayName]],program[id,displayName,programType,programTrackedEntityAttributes[id,trackedEntityAttribute[id,displayName,valueType]]]'; - expect(mockD2.models.programIndicator.get).to.be.calledWith('pTo4uMt3xur', { fields: fieldFilters }); + expect(mockD2.models.programIndicator.get).toBeCalledWith('pTo4uMt3xur', { fields: fieldFilters }); - done(); - }, - done); - }); + done(); + }, + done); + } + ); - it('should set the programIndicator onto the store', (done) => { + test('should set the programIndicator onto the store', (done) => { const action = { type: PROGRAM_INDICATOR_LOAD, payload: { @@ -74,7 +77,7 @@ describe('Program indicator epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.setState).to.be.calledWith({ + expect(store.setState).toBeCalledWith({ programIndicator: { id: 'pTo4uMt3xur', name: 'Age at visit - calc from days', @@ -86,28 +89,31 @@ describe('Program indicator epics', () => { done); }); - it('should set a new instance of programIndicator onto the store without calling the api', (done) => { - const action = { - type: PROGRAM_INDICATOR_LOAD, - payload: { - id: 'add', - }, - }; - - epic(createActionStreamFor(action)) - .subscribe( - () => { - expect(store.setState).to.be.calledWith({ - programIndicator: {}, - }); - - expect(mockD2.models.programIndicator.get).not.to.be.called; - expect(mockD2.models.programIndicator.create).to.be.called; - - done(); + test( + 'should set a new instance of programIndicator onto the store without calling the api', + (done) => { + const action = { + type: PROGRAM_INDICATOR_LOAD, + payload: { + id: 'add', }, - done); - }); + }; + + epic(createActionStreamFor(action)) + .subscribe( + () => { + expect(store.setState).toBeCalledWith({ + programIndicator: {}, + }); + + expect(mockD2.models.programIndicator.get).not.toHaveBeenCalled(); + expect(mockD2.models.programIndicator.create).toHaveBeenCalled(); + + done(); + }, + done); + } + ); }); describe('programIndicatorEdit', () => { @@ -127,7 +133,7 @@ describe('Program indicator epics', () => { }); }); - it('should set update the field on the programIndicator', (done) => { + test('should set update the field on the programIndicator', (done) => { const action = { type: PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED, payload: { @@ -139,7 +145,7 @@ describe('Program indicator epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.setState).to.be.calledWith({ + expect(store.setState).toBeCalledWith({ programIndicator: { id: 'pTo4uMt3xur', name: 'Age at the visit', @@ -155,7 +161,7 @@ describe('Program indicator epics', () => { ); }); - it('should update the attribute on the programIndicator', (done) => { + test('should update the attribute on the programIndicator', (done) => { const action = { type: PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED, payload: { @@ -167,7 +173,7 @@ describe('Program indicator epics', () => { epic(createActionStreamFor(action)) .subscribe( () => { - expect(store.setState).to.be.calledWith({ + expect(store.setState).toBeCalledWith({ programIndicator: { id: 'pTo4uMt3xur', name: 'Age at visit - calc from days', diff --git a/src/EditModel/program-indicator/__tests__/reducers.spec.js b/src/EditModel/program-indicator/__tests__/reducers.spec.js index 335c4c5f1..96e2f211e 100644 --- a/src/EditModel/program-indicator/__tests__/reducers.spec.js +++ b/src/EditModel/program-indicator/__tests__/reducers.spec.js @@ -1,38 +1,27 @@ -/* global sinon, expect */ -/* eslint-disable no-unused-expressions */ - import reducer from '../reducers'; import * as actions from '../actions'; import { STEPPER_RESET_ACTIVE_STEP } from '../../actions'; import * as iterator from '../../stepper/stepIterator'; describe('Program Indicator', () => { - let sandbox; - let nextStub; - let previousStub; - let firstStub; - - before(() => { - sandbox = sinon.sandbox.create(); - nextStub = sandbox.stub(iterator, 'next'); - previousStub = sandbox.stub(iterator, 'previous'); - firstStub = sandbox.stub(iterator, 'first'); + beforeAll(() => { + iterator.next = jest.fn(); + iterator.previous = jest.fn(); + iterator.first = jest.fn(); }); beforeEach(() => { - nextStub.reset(); - previousStub.reset(); - firstStub.reset(); + jest.resetAllMocks(); }); - after(() => { - sandbox.restore(); + afterAll(() => { + jest.restoreAllMocks(); }); describe('combined reducer', () => { - it('should return the program indicator state', () => { + test('should return the program indicator state', () => { const stepKey = 'shuffle'; - firstStub.returns(stepKey); + iterator.first.mockReturnValue(stepKey); const actualState = reducer(undefined, {}); @@ -42,14 +31,14 @@ describe('Program Indicator', () => { }, }; - expect(actualState).to.deep.equal(expectedState); + expect(actualState).toEqual(expectedState); }); }); describe('stepper reducer', () => { - it('should return the default state', () => { + test('should return the default state', () => { const stepKey = 'sprint'; - firstStub.returns(stepKey); + iterator.first.mockReturnValue(stepKey); const expectedStepState = { activeStep: stepKey, @@ -57,7 +46,7 @@ describe('Program Indicator', () => { const actualState = reducer(undefined, {}); - expect(actualState.step).to.deep.equal(expectedStepState); + expect(actualState.step).toEqual(expectedStepState); }); describe('when receiving actions', () => { @@ -67,7 +56,7 @@ describe('Program Indicator', () => { }, }; - it('should change the activeStep when receiving an PROGRAM_INDICATOR_STEP_CHANGE action', () => { + test('should change the activeStep when receiving an PROGRAM_INDICATOR_STEP_CHANGE action', () => { const expectedStepKey = 'hop'; const expectedState = { @@ -79,12 +68,12 @@ describe('Program Indicator', () => { payload: expectedStepKey, }); - expect(actualState.step).to.deep.equal(expectedState); + expect(actualState.step).toEqual(expectedState); }); - it('should request the next step when receiving an PROGRAM_INDICATOR_STEP_NEXT action', () => { + test('should request the next step when receiving an PROGRAM_INDICATOR_STEP_NEXT action', () => { const expectedStepKey = 'march'; - nextStub.returns(expectedStepKey); + iterator.next.mockReturnValue(expectedStepKey); const expectedState = { activeStep: expectedStepKey, @@ -92,14 +81,14 @@ describe('Program Indicator', () => { const actualState = reducer(initialState, { type: actions.PROGRAM_INDICATOR_STEP_NEXT }); - expect(nextStub).to.have.been.called; - expect(previousStub).not.to.have.been.called; - expect(actualState.step).to.deep.equal(expectedState); + expect(iterator.next).toHaveBeenCalledTimes(1); + expect(iterator.previous).toHaveBeenCalledTimes(0); + expect(actualState.step).toEqual(expectedState); }); - it('should request the previous step when receiving an PROGRAM_INDICATOR_STEP_PREVIOUS action', () => { + test('should request the previous step when receiving an PROGRAM_INDICATOR_STEP_PREVIOUS action', () => { const expectedStepKey = 'jog'; - previousStub.returns(expectedStepKey); + iterator.previous.mockReturnValue(expectedStepKey); const expectedState = { activeStep: expectedStepKey, @@ -107,14 +96,14 @@ describe('Program Indicator', () => { const actualState = reducer(initialState, { type: actions.PROGRAM_INDICATOR_STEP_PREVIOUS }); - expect(nextStub).not.to.have.been.called; - expect(previousStub).to.have.been.called; - expect(actualState.step).to.deep.equal(expectedState); + expect(iterator.next).toHaveBeenCalledTimes(0); + expect(iterator.previous).toHaveBeenCalledTimes(1); + expect(actualState.step).toEqual(expectedState); }); - it('shoud request the first step when receiving an STEPPER_RESET_ACTIVE_STEP action', () => { + test('shoud request the first step when receiving an STEPPER_RESET_ACTIVE_STEP action', () => { const expectedStepKey = 'sprint'; - firstStub.returns(expectedStepKey); + iterator.first.mockReturnValue(expectedStepKey); const expectedState = { activeStep: expectedStepKey, @@ -122,9 +111,9 @@ describe('Program Indicator', () => { const actualState = reducer(initialState, { type: STEPPER_RESET_ACTIVE_STEP }); - expect(nextStub).not.to.have.been.called; - expect(previousStub).not.to.have.been.called; - expect(actualState.step).to.deep.equal(expectedState); + expect(iterator.next).toHaveBeenCalledTimes(0); + expect(iterator.previous).toHaveBeenCalledTimes(0); + expect(actualState.step).toEqual(expectedState); }); }); }); diff --git a/src/EditModel/program-indicator/__tests__/selectors.spec.js b/src/EditModel/program-indicator/__tests__/selectors.spec.js new file mode 100644 index 000000000..edd26889e --- /dev/null +++ b/src/EditModel/program-indicator/__tests__/selectors.spec.js @@ -0,0 +1,29 @@ +import { activeStepSelector } from '../selectors'; + +describe('Program indicator selectors', () => { + describe('activeStepSelector', () => { + test('should return the activeStep from the state', () => { + const state = { + programIndicator: { + step: { + activeStep: 'details', + }, + }, + }; + + expect(activeStepSelector(state)).toBe('details'); + }); + + test('should return undefined if step does not exist', () => { + const state = {}; + + expect(activeStepSelector(state)).toBeUndefined(); + }); + + test('should return undefined if state is undefined', () => { + let state; + + expect(activeStepSelector(state)).toBeUndefined(); + }); + }); +}); diff --git a/src/EditModel/program-indicator/actions.spec.js b/src/EditModel/program-indicator/actions.spec.js deleted file mode 100644 index 5eab39f82..000000000 --- a/src/EditModel/program-indicator/actions.spec.js +++ /dev/null @@ -1,116 +0,0 @@ -import * as actions from './actions'; - -describe('Program indicator actions', () => { - describe('for stepper', () => { - it('should have defined the stepper constants', () => { - expect(actions.PROGRAM_INDICATOR_STEP_PREVIOUS).to.equal('PROGRAM_INDICATOR_STEP_PREVIOUS'); - expect(actions.PROGRAM_INDICATOR_STEP_NEXT).to.equal('PROGRAM_INDICATOR_STEP_NEXT'); - expect(actions.PROGRAM_INDICATOR_STEP_CHANGE).to.equal('PROGRAM_INDICATOR_STEP_CHANGE'); - }); - - it('should create the PROGRAM_INDICATOR_STEP_CHANGE action', () => { - expect(actions.changeStep()).to.deep.equal({ type: actions.PROGRAM_INDICATOR_STEP_CHANGE, payload: undefined }); - }); - - it('should use the parameter as the payload', () => { - expect(actions.changeStep('details')).to.deep.equal({ type: actions.PROGRAM_INDICATOR_STEP_CHANGE, payload: 'details' }); - }); - - it('should create the PROGRAM_INDICATOR_STEP_NEXT action', () => { - expect(actions.nextStep()).to.deep.equal({ type: actions.PROGRAM_INDICATOR_STEP_NEXT }); - }); - - it('should create the PROGRAM_INDICATOR_STEP_PREVIOUS action', () => { - expect(actions.previousStep()).to.deep.equal({ type: actions.PROGRAM_INDICATOR_STEP_PREVIOUS }); - }); - }); - - describe('for loading a program indicator', () => { - it('should have the program indicator load constants', () => { - expect(actions.PROGRAM_INDICATOR_LOAD).to.equal('PROGRAM_INDICATOR_LOAD'); - expect(actions.PROGRAM_INDICATOR_LOAD_SUCCESS).to.equal('PROGRAM_INDICATOR_LOAD_SUCCESS'); - expect(actions.PROGRAM_INDICATOR_LOAD_ERROR).to.equal('PROGRAM_INDICATOR_LOAD_ERROR'); - }); - - it('should create the PROGRAM_INDICATOR_LOAD action', () => { - expect(actions.loadProgramIndicator()).to.deep.equal({ type: actions.PROGRAM_INDICATOR_LOAD, payload: undefined }); - }); - - it('should create the PROGRAM_INDICATOR_LOAD_SUCCESS action', () => { - expect(actions.loadProgramIndicatorSuccess()).to.deep.equal({ type: actions.PROGRAM_INDICATOR_LOAD_SUCCESS, payload: undefined }); - }); - - it('should create the PROGRAM_INDICATOR_LOAD_SUCCESS action', () => { - expect(actions.loadProgramIndicatorFailure()).to.deep.equal({ type: actions.PROGRAM_INDICATOR_LOAD_ERROR, payload: undefined }); - }); - }); - - describe('for editing models', () => { - it('should have defined the model constants', () => { - expect(actions.PROGRAM_INDICATOR_LOAD).to.equal('PROGRAM_INDICATOR_LOAD'); - expect(actions.PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED).to.equal('PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED'); - }); - - it('should create the action when calling editFieldChanged', () => { - const expectedAction = { - type: 'PROGRAM_INDICATOR_TO_EDIT_FIELD_CHANGED', - payload: { - field: 'name', - value: 'John', - }, - }; - - expect(actions.editFieldChanged('name', 'John')).to.deep.equal(expectedAction); - }); - }); - - describe('for saving an program indicator', () => { - it('should have defined the constants', () => { - expect(actions.PROGRAM_INDICATOR_SAVE).to.equal('PROGRAM_INDICATOR_SAVE'); - expect(actions.PROGRAM_INDICATOR_SAVE_SUCCESS).to.equal('PROGRAM_INDICATOR_SAVE_SUCCESS'); - expect(actions.PROGRAM_INDICATOR_SAVE_ERROR).to.equal('PROGRAM_INDICATOR_SAVE_ERROR'); - }); - - it('should create the save action when calling saveProgramIndicator', () => { - const expectedAction = { - type: actions.PROGRAM_INDICATOR_SAVE, - payload: undefined, - }; - - expect(actions.saveProgramIndicator()).to.deep.equal(expectedAction); - }); - - it('should create the save success action when calling saveProgramIndicatorSuccess', () => { - const expectedAction = { - type: actions.PROGRAM_INDICATOR_SAVE_SUCCESS, - payload: undefined, - }; - - expect(actions.saveProgramIndicatorSuccess()).to.deep.equal(expectedAction); - }); - - it('should create the save error action when calling saveProgramIndicatorError', () => { - const expectedAction = { - type: actions.PROGRAM_INDICATOR_SAVE_ERROR, - payload: new Error('Could not load'), - }; - - expect(actions.saveProgramIndicatorError(new Error('Could not load'))).to.deep.equal(expectedAction); - }); - }); - - describe('for notifying users', () => { - it('should defined the notification constants', () => { - expect(actions.NOTIFY_USER).to.equal('NOTIFY_USER'); - }); - - it('should create a notify user action when calling notifyUser', () => { - const expectedAction = { - type: actions.NOTIFY_USER, - payload: undefined, - }; - - expect(actions.notifyUser()).to.deep.equal(expectedAction); - }); - }); -}); diff --git a/src/EditModel/program-indicator/selectors.spec.js b/src/EditModel/program-indicator/selectors.spec.js deleted file mode 100644 index 7b872e53a..000000000 --- a/src/EditModel/program-indicator/selectors.spec.js +++ /dev/null @@ -1,29 +0,0 @@ -import { activeStepSelector } from './selectors'; - -describe('Program indicator selectors', () => { - describe('activeStepSelector', () => { - it('should return the activeStep from the state', () => { - const state = { - programIndicator: { - step: { - activeStep: 'details', - }, - }, - }; - - expect(activeStepSelector(state)).to.equal('details'); - }); - - it('should return undefined if step does not exist', () => { - const state = {}; - - expect(activeStepSelector(state)).to.be.undefined; - }); - - it('should return undefined if state is undefined', () => { - let state; - - expect(activeStepSelector(state)).to.be.undefined; - }); - }); -}); diff --git a/src/EditModel/stepper/__tests__/stepIterator.spec.js b/src/EditModel/stepper/__tests__/stepIterator.spec.js index 553b08a4d..35d80e3d1 100644 --- a/src/EditModel/stepper/__tests__/stepIterator.spec.js +++ b/src/EditModel/stepper/__tests__/stepIterator.spec.js @@ -20,34 +20,34 @@ const bacalaoSteps = [ describe('Step iterator', () => { describe('next', () => { - it('should return the next item when current item is not last', () => { + test('should return the next item when current item is not last', () => { const actualStep = next(bacalaoSteps, COOK_INGREDIENTS); - expect(actualStep).to.equal(SERVE_BACALAO); + expect(actualStep).toBe(SERVE_BACALAO); }); - it('should return the same item when current item is last', () => { + test('should return the same item when current item is last', () => { const actualStep = next(bacalaoSteps, SERVE_BACALAO); - expect(actualStep).to.equal(SERVE_BACALAO); + expect(actualStep).toBe(SERVE_BACALAO); }); }); describe('previous', () => { - it('should return the previous item when current item is not first', () => { + test('should return the previous item when current item is not first', () => { const actualStep = previous(bacalaoSteps, COOK_INGREDIENTS); - expect(actualStep).to.equal(GET_INGREDIENTS); + expect(actualStep).toBe(GET_INGREDIENTS); }); - it('should return the same item when current item is first', () => { + test('should return the same item when current item is first', () => { const actualStep = previous(bacalaoSteps, GET_INGREDIENTS); - expect(actualStep).to.equal(GET_INGREDIENTS); + expect(actualStep).toBe(GET_INGREDIENTS); }); }); describe('first', () => { - it('should return the first item', () => { + test('should return the first item', () => { const actualStep = first(bacalaoSteps); - expect(actualStep).to.equal(GET_INGREDIENTS); + expect(actualStep).toBe(GET_INGREDIENTS); }); }); }); diff --git a/src/EditModel/stepper/__tests__/stepper.spec.js b/src/EditModel/stepper/__tests__/stepper.spec.js index 8af647187..9ec73ad24 100644 --- a/src/EditModel/stepper/__tests__/stepper.spec.js +++ b/src/EditModel/stepper/__tests__/stepper.spec.js @@ -1,9 +1,5 @@ -/* global sinon, expect */ - import React from 'react'; -import { createStepperFromConfig, createStepperContentFromConfig, StepperNavigationBack, StepperNavigationForward } from '../stepper'; import { shallow } from 'enzyme'; -import getMuiTheme from 'material-ui/styles/getMuiTheme'; import Stepper from 'material-ui/Stepper/Stepper'; import Step from 'material-ui/Stepper/Step'; import StepContent from 'material-ui/Stepper/StepContent'; @@ -12,6 +8,12 @@ import IconButton from 'material-ui/IconButton'; import ForwardIcon from 'material-ui/svg-icons/navigation/arrow-forward'; import BackwardIcon from 'material-ui/svg-icons/navigation/arrow-back'; import log from 'loglevel'; +import { + createStepperFromConfig, + createStepperContentFromConfig, + StepperNavigationBack, + StepperNavigationForward, +} from '../stepper'; describe('Stepper utility functions', () => { const renderStepper = (stepperConfig, props = {}) => { @@ -21,126 +23,136 @@ describe('Stepper utility functions', () => { }; let stepperConfig; - let renderedStepper; beforeEach(() => { stepperConfig = [ { key: 'first', name: 'First step!' }, { key: 'last', name: 'My last step!' }, ]; - - renderedStepper = renderStepper(stepperConfig); }); describe('createStepperFromConfig', () => { - it('should render a Stepper component', () => { - expect(renderedStepper).to.be.type(Stepper); + test('should render a Stepper component', () => { + const renderedStepper = renderStepper(stepperConfig); + expect(renderedStepper.type()).toEqual(Stepper); }); - it('should render 2 steps', () => { - expect(renderedStepper).to.have.exactly(2).descendants(Step); + test('should render 2 steps', () => { + const renderedStepper = renderStepper(stepperConfig); + expect(renderedStepper.children()).toHaveLength(2); + expect(renderedStepper.children(Step)).toHaveLength(2); }); - it('should render in default horizontal position', () => { - expect(renderedStepper).to.have.prop('orientation', 'horizontal'); + test('should render in default horizontal position', () => { + const renderedStepper = renderStepper(stepperConfig); + + expect(renderedStepper.prop('orientation')).toBe('horizontal'); }); - it('should render in vertical position', () => { + test('should render in vertical position', () => { const VerticalStepper = createStepperFromConfig(stepperConfig, 'vertical'); - renderedStepper = shallow(); + const renderedStepper = shallow(); - expect(renderedStepper).to.have.prop('orientation', 'vertical'); + expect(renderedStepper.prop('orientation')).toBe('vertical'); }); - it('should render both steps as not active', () => { - expect(renderedStepper.find(Step).at(0)).to.have.prop('active', false); - expect(renderedStepper.find(Step).at(1)).to.have.prop('active', false); + test('should render both steps as not active', () => { + const renderedStepper = renderStepper(stepperConfig); + + expect(renderedStepper.find(Step).at(0).prop('active')).toBe(false); + expect(renderedStepper.find(Step).at(1).prop('active')).toBe(false); }); - it('should render the 2nd step as active', () => { - renderedStepper = renderStepper(stepperConfig, { + test('should render the 2nd step as active', () => { + const renderedStepper = renderStepper(stepperConfig, { activeStep: 'last', }); - expect(renderedStepper.children().at(0)).to.have.prop('active', false); - expect(renderedStepper.children().at(1)).to.have.prop('active', true); + expect(renderedStepper.children().at(0).prop('active')).toBe(false); + expect(renderedStepper.children().at(1).prop('active')).toBe(true); }); - it('should render the 2nd step as active by index', () => { - renderedStepper = renderStepper(stepperConfig, { + test('should render the 2nd step as active by index', () => { + const renderedStepper = renderStepper(stepperConfig, { activeStep: 1, }); - expect(renderedStepper.children().at(0)).to.have.prop('active', false); - expect(renderedStepper.children().at(1)).to.have.prop('active', true); + expect(renderedStepper.childAt(0).prop('active')).toBe(false); + expect(renderedStepper.childAt(1).prop('active')).toBe(true); }); - it('should render a StepContent component when a step has content', () => { + test('should render a StepContent component when a step has content', () => { stepperConfig[0].content = () =>
Content!
; - renderedStepper = renderStepper(stepperConfig); + const renderedStepper = renderStepper(stepperConfig); - expect(renderedStepper.find(Step).at(0)).to.have.exactly(1).descendants(StepContent); + expect(renderedStepper.find(Step).at(0).children(StepContent)).toHaveLength(1); }); - it('should render call the stepperClicked callback', () => { - const stepperClicked = sinon.spy(); - renderedStepper = renderStepper(stepperConfig, { stepperClicked }); + test('should render call the stepperClicked callback', () => { + const stepperClicked = jest.fn(); + const renderedStepper = renderStepper(stepperConfig, { stepperClicked }); renderedStepper.find(StepButton).at(0).simulate('click'); - expect(stepperClicked).to.have.been.calledWith('first'); + expect(stepperClicked).toHaveBeenCalledWith('first'); }); }); describe('createStepperContentFromConfig', () => { beforeEach(() => { - sinon.stub(log, 'warn'); + jest.spyOn(log, 'warn'); }); afterEach(() => { - log.warn.restore(); + jest.resetAllMocks(); }); - it('should log a warning when no active step has been passed', () => { + test('should log a warning when no active step has been passed', () => { const ContentStepper = createStepperContentFromConfig(stepperConfig); - renderedStepper = shallow(); + const renderedStepper = shallow(); - expect(log.warn).to.be.calledWith('The `activeStep` prop is undefined, therefore the component created by `createStepperContentFromConfig` will render null'); + expect(log.warn).toBeCalledWith('The `activeStep` prop is undefined, therefore the component created by `createStepperContentFromConfig` will render null'); }); - it('should log a warning when the step does not have a component', () => { + test('should log a warning when the step does not have a component', () => { const ContentStepper = createStepperContentFromConfig(stepperConfig); - renderedStepper = shallow(); + const renderedStepper = shallow(); - expect(log.warn).to.be.calledWith('Could not find a content component for a step with key (first) in', stepperConfig); + expect(log.warn).toBeCalledWith('Could not find a content component for a step with key (first) in', stepperConfig); }); - it('should render null when no component has been provided', () => { + test('should render null when no component has been provided', () => { const ContentStepper = createStepperContentFromConfig(stepperConfig); - renderedStepper = shallow(); + const renderedStepper = shallow(); - expect(renderedStepper).to.be.blank(); + expect(renderedStepper.html()).toBeNull(); }); - it('should render the component that is provided with the step when that step is active', () => { - const MyContent = () => (
My content
); - stepperConfig[0].component = MyContent; + test( + 'should render the component that is provided with the step when that step is active', + () => { + const MyContent = () => (
My content
); + stepperConfig[0].component = MyContent; - const ContentStepper = createStepperContentFromConfig(stepperConfig); - renderedStepper = shallow(); + const ContentStepper = createStepperContentFromConfig(stepperConfig); + const renderedStepper = shallow(); - expect(renderedStepper).to.have.type(MyContent); - }); + expect(renderedStepper.type()).toEqual(MyContent); + } + ); - it('should pass the props (besides `activeStep`) through to the step component', () => { - const MyContent = () => (
My content
); - stepperConfig[0].component = MyContent; + test( + 'should pass the props (besides `activeStep`) through to the step component', + () => { + const MyContent = () => (
My content
); + stepperConfig[0].component = MyContent; - const ContentStepper = createStepperContentFromConfig(stepperConfig); - renderedStepper = shallow(); + const ContentStepper = createStepperContentFromConfig(stepperConfig); + const renderedStepper = shallow(); - expect(renderedStepper.props()).to.deep.equal({ name: 'John', coolStyle: true }); - }); + expect(renderedStepper.props()).toEqual({ name: 'John', coolStyle: true }); + } + ); }); describe('StepperNavigationBack', () => { @@ -148,22 +160,26 @@ describe('Stepper utility functions', () => { let onBackClickSpy; beforeEach(() => { - onBackClickSpy = sinon.spy(); + onBackClickSpy = jest.fn(); backButton = shallow(); }); - it('should render a IconButton', () => { - expect(backButton).to.have.type(IconButton); + afterEach(() => { + jest.clearAllMocks(); + }); + + test('should render a IconButton', () => { + expect(backButton.type()).toEqual(IconButton); }); - it('should render a BackwardIcon', () => { - expect(backButton).to.have.exactly(1).descendants(BackwardIcon); + test('should render a BackwardIcon', () => { + expect(backButton.children(BackwardIcon)).toHaveLength(1); }); - it('should call the onBackClick callback when the button is clicked', () => { + test('should call the onBackClick callback when the button is clicked', () => { backButton.simulate('click'); - expect(onBackClickSpy).to.be.called; + expect(onBackClickSpy).toHaveBeenCalled(); }); }); @@ -172,22 +188,22 @@ describe('Stepper utility functions', () => { let onForwardClickSpy; beforeEach(() => { - onForwardClickSpy = sinon.spy(); + onForwardClickSpy = jest.fn(); forwardButton = shallow(); }); - it('should render a IconButton', () => { - expect(forwardButton).to.have.type(IconButton); + test('should render a IconButton', () => { + expect(forwardButton.type()).toEqual(IconButton); }); - it('should render a ForwardIcon', () => { - expect(forwardButton).to.have.exactly(1).descendants(ForwardIcon); + test('should render a ForwardIcon', () => { + expect(forwardButton.children(ForwardIcon)).toHaveLength(1); }); - it('should call the onForwardClick callback when the button is clicked', () => { + test('should call the onForwardClick callback when the button is clicked', () => { forwardButton.simulate('click'); - expect(onForwardClickSpy).to.be.called; + expect(onForwardClickSpy).toHaveBeenCalled(); }); }); }); diff --git a/test/fixtureUpdater.js b/src/__fixtures__/fixtureUpdater.js similarity index 100% rename from test/fixtureUpdater.js rename to src/__fixtures__/fixtureUpdater.js diff --git a/test/fixtures/schemas/dataEntryForm.json b/src/__fixtures__/schemas/dataEntryForm.json similarity index 100% rename from test/fixtures/schemas/dataEntryForm.json rename to src/__fixtures__/schemas/dataEntryForm.json diff --git a/test/fixtures/schemas/program.json b/src/__fixtures__/schemas/program.json similarity index 100% rename from test/fixtures/schemas/program.json rename to src/__fixtures__/schemas/program.json diff --git a/test/fixtures/schemas/programNotificationTemplate.json b/src/__fixtures__/schemas/programNotificationTemplate.json similarity index 100% rename from test/fixtures/schemas/programNotificationTemplate.json rename to src/__fixtures__/schemas/programNotificationTemplate.json diff --git a/test/fixtures/schemas/programStage.json b/src/__fixtures__/schemas/programStage.json similarity index 100% rename from test/fixtures/schemas/programStage.json rename to src/__fixtures__/schemas/programStage.json diff --git a/yarn.lock b/yarn.lock index cad27cd9b..6cebb7aee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,11 +2,23 @@ # yarn lockfile v1 +"@types/node@^6.0.46": + version "6.0.88" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.88.tgz#f618f11a944f6a18d92b5c472028728a3e3d4b66" + +"@types/react@^15.0.22": + version "15.6.4" + resolved "https://registry.yarnpkg.com/@types/react/-/react-15.6.4.tgz#3bb57bd43183a05919ceb025a264287348f47e9d" + +abab@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" -accepts@~1.3.3, accepts@~1.3.4: +accepts@~1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" dependencies: @@ -19,6 +31,12 @@ acorn-dynamic-import@^2.0.0: dependencies: acorn "^4.0.3" +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + acorn-jsx@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" @@ -29,7 +47,7 @@ acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.3: +acorn@^4.0.3, acorn@^4.0.4: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" @@ -77,6 +95,10 @@ ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" + ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -93,7 +115,7 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0: +ansi-styles@^3.1.0, ansi-styles@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" dependencies: @@ -143,6 +165,10 @@ arr-flatten@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -217,14 +243,14 @@ assert@^1.1.1: dependencies: util "0.10.3" -assertion-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" - ast-types@0.9.6: version "0.9.6" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9" +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -237,7 +263,7 @@ async@^1.4.0, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.1.2, async@^2.1.5: +async@^2.1.2, async@^2.1.4, async@^2.1.5: version "2.5.0" resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" dependencies: @@ -282,7 +308,7 @@ babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0, ba esutils "^2.0.2" js-tokens "^3.0.2" -babel-core@^6.13.2, babel-core@^6.26.0: +babel-core@^6.0.0, babel-core@^6.13.2, babel-core@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" dependencies: @@ -454,6 +480,13 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" +babel-jest@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.2.0.tgz#2ce059519a9374a2c46f2455b6fbef5ad75d863e" + dependencies: + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^21.2.0" + babel-loader@^7.0.0: version "7.1.2" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.2.tgz#f6cbe122710f1aa2af4d881c6d5b54358ca24126" @@ -474,6 +507,18 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-istanbul@^4.0.0: + version "4.1.5" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.5" + test-exclude "^4.1.1" + +babel-plugin-jest-hoist@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" + babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -522,7 +567,7 @@ babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" -babel-plugin-syntax-object-rest-spread@^6.8.0: +babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" @@ -874,6 +919,13 @@ babel-preset-flow@^6.23.0: dependencies: babel-plugin-transform-flow-strip-types "^6.22.0" +babel-preset-jest@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz#ff9d2bce08abd98e8a36d9a8a5189b9173b85638" + dependencies: + babel-plugin-jest-hoist "^21.2.0" + babel-plugin-syntax-object-rest-spread "^6.13.0" + babel-preset-react@^6.11.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380" @@ -1028,6 +1080,21 @@ bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" +body-parser@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + bonjour@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" @@ -1084,9 +1151,11 @@ brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.0.8" @@ -1147,6 +1216,12 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + buffer-indexof@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" @@ -1193,6 +1268,10 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" @@ -1219,6 +1298,10 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + caniuse-api@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" @@ -1229,8 +1312,8 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000739" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000739.tgz#be734deb6bed4ed8a69d72fb9078bc6ea6d76ad0" + version "1.0.30000740" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000740.tgz#03fcaaa176e3ed075895f72d46c1a12149bbeac9" caseless@~0.12.0: version "0.12.0" @@ -1243,21 +1326,6 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chai-enzyme@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/chai-enzyme/-/chai-enzyme-0.6.1.tgz#585c963c6ea1331446efd12ee8391e807d758620" - dependencies: - html "^1.0.0" - react-element-to-jsx-string "^5.0.0" - -chai@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" - dependencies: - assertion-error "^1.0.1" - deep-eql "^0.1.3" - type-detect "^1.0.0" - chain-function@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc" @@ -1272,7 +1340,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.1.0: +chalk@^2.0.1, chalk@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" dependencies: @@ -1284,26 +1352,16 @@ change-emitter@^0.1.2: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" -cheerio@^0.22.0: - version "0.22.0" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" +cheerio@^1.0.0-rc.2: + version "1.0.0-rc.2" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db" dependencies: css-select "~1.2.0" dom-serializer "~0.1.0" entities "~1.1.1" htmlparser2 "^3.9.1" - lodash.assignin "^4.0.9" - lodash.bind "^4.1.4" - lodash.defaults "^4.0.1" - lodash.filter "^4.4.0" - lodash.flatten "^4.2.0" - lodash.foreach "^4.3.0" - lodash.map "^4.4.0" - lodash.merge "^4.4.0" - lodash.pick "^4.2.1" - lodash.reduce "^4.4.0" - lodash.reject "^4.4.0" - lodash.some "^4.4.0" + lodash "^4.15.0" + parse5 "^3.0.1" chokidar@^1.6.0, chokidar@^1.7.0: version "1.7.0" @@ -1320,6 +1378,10 @@ chokidar@^1.6.0, chokidar@^1.7.0: optionalDependencies: fsevents "^1.0.0" +ci-info@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a" + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -1407,10 +1469,6 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -collapse-white-space@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.3.tgz#4b906f670e5a963a87b76b0e1689643341b6023c" - color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" @@ -1443,6 +1501,10 @@ colormin@^1.0.5: css-color-names "0.0.4" has "^1.0.1" +colors@0.5.x: + version "0.5.1" + resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" + colors@^1.0.3, colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -1457,12 +1519,6 @@ commander@2.11.x, commander@^2.5.0, commander@^2.9.0, commander@~2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" - commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -1503,7 +1559,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.7, concat-stream@^1.5.2: +concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1537,11 +1593,15 @@ content-disposition@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" -content-type@~1.0.2: +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +content-type@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.3.0, convert-source-map@^1.5.0: +convert-source-map@^1.3.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" @@ -1614,6 +1674,14 @@ cross-spawn@^4: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -1739,6 +1807,16 @@ csso@~2.3.1: clap "^1.0.9" source-map "^0.5.3" +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -1850,12 +1928,6 @@ debug-log@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -debug@2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -1866,11 +1938,11 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" -deep-eql@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" +deep-equal-ident@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal-ident/-/deep-equal-ident-1.1.1.tgz#06f4b89e53710cd6cea4a7781c7a956642de8dc9" dependencies: - type-detect "0.1.1" + lodash.isequal "^3.0" deep-equal@^1.0.1: version "1.0.1" @@ -1964,11 +2036,7 @@ detective@^4.3.1: acorn "^4.0.3" defined "^1.0.0" -diff@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" - -diff@^3.1.0: +diff@^3.2.0: version "3.3.1" resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" @@ -1980,6 +2048,10 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +discontinuous-range@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" + disposables@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/disposables/-/disposables-1.0.1.tgz#064727a25b54f502bd82b89aa2dfb8df9f1b39e3" @@ -2108,10 +2180,6 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" -editions@^1.1.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/editions/-/editions-1.3.3.tgz#0907101bdda20fac3cbe334c27cbd0688dc99a5b" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -2121,8 +2189,8 @@ ejs@^2.5.6: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a" electron-to-chromium@^1.2.7: - version "1.3.23" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.23.tgz#e6668ab18cb69afb8f577c8a9fc23d002788be74" + version "1.3.24" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.24.tgz#9b7b88bb05ceb9fa016a177833cc2dde388f21b6" elliptic@^6.0.0: version "6.4.0" @@ -2174,22 +2242,52 @@ envify@^3.0.0: jstransform "^11.0.3" through "~2.3.4" -enzyme@^2.8.0: - version "2.9.1" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-2.9.1.tgz#07d5ce691241240fb817bf2c4b18d6e530240df6" +enzyme-adapter-react-15@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/enzyme-adapter-react-15/-/enzyme-adapter-react-15-1.0.0.tgz#2f97f024324c585a6523034d4ba99bd6ca29ce56" + dependencies: + enzyme-adapter-utils "^1.0.0" + lodash "^4.17.4" + object.assign "^4.0.4" + object.values "^1.0.4" + prop-types "^15.5.10" + +enzyme-adapter-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.0.0.tgz#e94eee63da9a798d498adb1162a2102ed04fc638" + dependencies: + lodash "^4.17.4" + object.assign "^4.0.4" + prop-types "^15.5.10" + +enzyme-matchers@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/enzyme-matchers/-/enzyme-matchers-4.0.0.tgz#3158166a5004f289895d203f58372bb7867a88e5" dependencies: - cheerio "^0.22.0" - function.prototype.name "^1.0.0" + deep-equal-ident "^1.1.1" + +enzyme-to-json@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/enzyme-to-json/-/enzyme-to-json-3.0.1.tgz#16468e2ff3e4db817d84f9df38760abbc322273d" + dependencies: + lodash "^4.17.4" + +enzyme@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.0.0.tgz#94ce364254dc654c4e619b25eecc644bf6481de7" + dependencies: + cheerio "^1.0.0-rc.2" + function.prototype.name "^1.0.3" is-subset "^0.1.1" lodash "^4.17.4" object-is "^1.0.1" object.assign "^4.0.4" object.entries "^1.0.4" object.values "^1.0.4" - prop-types "^15.5.10" - uuid "^3.0.1" + raf "^3.3.2" + rst-selector-parser "^2.2.1" -errno@^0.1.3: +errno@^0.1.3, errno@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" dependencies: @@ -2202,8 +2300,8 @@ error-ex@^1.2.0: is-arrayish "^0.2.1" es-abstract@^1.6.1, es-abstract@^1.7.0: - version "1.8.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.2.tgz#25103263dc4decbda60e0c737ca32313518027ee" + version "1.9.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -2275,10 +2373,21 @@ escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +escodegen@^1.6.1: + version "1.9.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.5.6" + escope@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" @@ -2412,14 +2521,14 @@ esprima@^2.6.0: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.3, esprima@~3.1.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -esprima@~3.1.0: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - esquery@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" @@ -2441,7 +2550,7 @@ esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -etag@~1.8.0, etag@~1.8.1: +etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" @@ -2473,6 +2582,24 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +exec-sh@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" + dependencies: + merge "^1.1.3" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -2493,38 +2620,51 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expect@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-21.2.1.tgz#003ac2ac7005c3c29e73b38a272d4afadd6d1d7b" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^21.2.1" + jest-get-type "^21.2.0" + jest-matcher-utils "^21.2.1" + jest-message-util "^21.2.1" + jest-regex-util "^21.2.0" + express@^4.13.3, express@^4.15.2: - version "4.15.5" - resolved "https://registry.yarnpkg.com/express/-/express-4.15.5.tgz#670235ca9598890a5ae8170b83db722b842ed927" + version "4.16.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.1.tgz#6b33b560183c9b253b7b62144df33a4654ac9ed0" dependencies: - accepts "~1.3.3" + accepts "~1.3.4" array-flatten "1.1.1" + body-parser "1.18.2" content-disposition "0.5.2" - content-type "~1.0.2" + content-type "~1.0.4" cookie "0.3.1" cookie-signature "1.0.6" debug "2.6.9" depd "~1.1.1" encodeurl "~1.0.1" escape-html "~1.0.3" - etag "~1.8.0" - finalhandler "~1.0.6" + etag "~1.8.1" + finalhandler "1.1.0" fresh "0.5.2" merge-descriptors "1.0.1" methods "~1.1.2" on-finished "~2.3.0" - parseurl "~1.3.1" + parseurl "~1.3.2" path-to-regexp "0.1.7" - proxy-addr "~1.1.5" - qs "6.5.0" + proxy-addr "~2.0.2" + qs "6.5.1" range-parser "~1.2.0" - send "0.15.6" - serve-static "1.12.6" - setprototypeof "1.0.3" + safe-buffer "5.1.1" + send "0.16.1" + serve-static "1.13.1" + setprototypeof "1.1.0" statuses "~1.3.1" type-is "~1.6.15" - utils-merge "1.0.0" - vary "~1.1.1" + utils-merge "1.0.1" + vary "~1.1.2" extend@~3.0.0, extend@~3.0.1: version "3.0.1" @@ -2564,6 +2704,12 @@ faye-websocket@~0.11.0: dependencies: websocket-driver ">=0.5.1" +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + fbjs@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.6.1.tgz#9636b7705f5ba9684d44b72f78321254afc860f7" @@ -2604,6 +2750,13 @@ filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + filesize@^3.5.9: version "3.5.10" resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.10.tgz#fc8fa23ddb4ef9e5e0ab6e1e64f679a24a56761f" @@ -2618,9 +2771,9 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" -finalhandler@~1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.6.tgz#007aea33d1a4d3e42017f624848ad58d212f814f" +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" dependencies: debug "2.6.9" encodeurl "~1.0.1" @@ -2653,7 +2806,7 @@ find-up@^1.0.0, find-up@^1.1.2: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -2723,13 +2876,7 @@ form-data@~2.3.1: combined-stream "^1.0.5" mime-types "^2.1.12" -formatio@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/formatio/-/formatio-1.2.0.tgz#f3b2167d9068c4698a8d51f4f760a39a54d818eb" - dependencies: - samsam "1.x" - -forwarded@~0.1.0: +forwarded@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" @@ -2741,7 +2888,7 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.0.0: +fsevents@^1.0.0, fsevents@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" dependencies: @@ -2769,7 +2916,7 @@ function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" -function.prototype.name@^1.0.0: +function.prototype.name@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.0.3.tgz#0099ae5572e9dd6f03c97d023fd92bcc5e639eac" dependencies: @@ -2814,6 +2961,10 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -2837,17 +2988,6 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -2858,7 +2998,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@~7.1.1: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2906,13 +3046,9 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" gzip-size@^3.0.0: version "3.0.0" @@ -3018,7 +3154,7 @@ hawk@~6.0.2: hoek "4.x.x" sntp "2.x.x" -he@1.1.1, he@1.1.x: +he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" @@ -3079,6 +3215,12 @@ html-comment-regex@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + html-entities@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" @@ -3107,12 +3249,6 @@ html-webpack-plugin@^2.26.0: pretty-error "^2.0.2" toposort "^1.0.0" -html@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/html/-/html-1.0.0.tgz#a544fa9ea5492bfb3a2cca8210a10be7b5af1f61" - dependencies: - concat-stream "^1.4.7" - htmlparser2@3.8.x: version "3.8.3" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" @@ -3147,7 +3283,7 @@ http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" -http-errors@~1.6.1, http-errors@~1.6.2: +http-errors@1.6.2, http-errors@~1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" dependencies: @@ -3200,7 +3336,11 @@ hyphenate-style-name@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b" -iconv-lite@^0.4.5, iconv-lite@~0.4.13: +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +iconv-lite@0.4.19, iconv-lite@^0.4.5, iconv-lite@~0.4.13: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" @@ -3316,9 +3456,9 @@ ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" -ipaddr.js@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0" +ipaddr.js@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.5.2.tgz#d4b505bde9946987ccf0fc58d9010ff9607e3fa0" is-absolute-url@^2.0.0: version "2.1.0" @@ -3348,6 +3488,12 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" +is-ci@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" @@ -3467,17 +3613,13 @@ is-regex@^1.0.4: dependencies: has "^1.0.1" -is-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" - is-resolvable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" dependencies: tryit "^1.0.1" -is-stream@^1.0.1: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -3540,17 +3682,33 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" +istanbul-api@^1.1.1: + version "1.1.14" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.14.tgz#25bc5701f7c680c0ffff913de46e3619a3a6e680" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.8.0" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.2" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" -istanbul-lib-hook@^1.0.0: +istanbul-lib-hook@^1.0.0, istanbul-lib-hook@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2: +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz#66f6c9421cc9ec4704f76f2db084ba9078a2b532" dependencies: @@ -3562,7 +3720,7 @@ istanbul-lib-instrument@^1.4.2: istanbul-lib-coverage "^1.1.1" semver "^5.3.0" -istanbul-lib-report@^1.0.0-alpha.3: +istanbul-lib-report@^1.0.0-alpha.3, istanbul-lib-report@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" dependencies: @@ -3571,7 +3729,7 @@ istanbul-lib-report@^1.0.0-alpha.3: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.1.0: +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" dependencies: @@ -3581,12 +3739,245 @@ istanbul-lib-source-maps@^1.1.0: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.0.0: +istanbul-reports@^1.0.0, istanbul-reports@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.2.tgz#0fb2e3f6aa9922bd3ce45d05d8ab4d5e8e07bd4f" dependencies: handlebars "^4.0.3" +jest-changed-files@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-21.2.0.tgz#5dbeecad42f5d88b482334902ce1cba6d9798d29" + dependencies: + throat "^4.0.0" + +jest-cli@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-21.2.1.tgz#9c528b6629d651911138d228bdb033c157ec8c00" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^21.2.0" + jest-config "^21.2.1" + jest-environment-jsdom "^21.2.1" + jest-haste-map "^21.2.0" + jest-message-util "^21.2.1" + jest-regex-util "^21.2.0" + jest-resolve-dependencies "^21.2.0" + jest-runner "^21.2.1" + jest-runtime "^21.2.1" + jest-snapshot "^21.2.1" + jest-util "^21.2.1" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^3.0.0" + slash "^1.0.0" + string-length "^2.0.0" + strip-ansi "^4.0.0" + which "^1.2.12" + worker-farm "^1.3.1" + yargs "^9.0.0" + +jest-config@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-21.2.1.tgz#c7586c79ead0bcc1f38c401e55f964f13bf2a480" + dependencies: + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^21.2.1" + jest-environment-node "^21.2.1" + jest-get-type "^21.2.0" + jest-jasmine2 "^21.2.1" + jest-regex-util "^21.2.0" + jest-resolve "^21.2.0" + jest-util "^21.2.1" + jest-validate "^21.2.1" + pretty-format "^21.2.1" + +jest-diff@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-21.2.1.tgz#46cccb6cab2d02ce98bc314011764bb95b065b4f" + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^21.2.0" + pretty-format "^21.2.1" + +jest-docblock@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" + +jest-environment-jsdom@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-21.2.1.tgz#38d9980c8259b2a608ec232deee6289a60d9d5b4" + dependencies: + jest-mock "^21.2.0" + jest-util "^21.2.1" + jsdom "^9.12.0" + +jest-environment-node@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-21.2.1.tgz#98c67df5663c7fbe20f6e792ac2272c740d3b8c8" + dependencies: + jest-mock "^21.2.0" + jest-util "^21.2.1" + +jest-enzyme@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jest-enzyme/-/jest-enzyme-4.0.0.tgz#61ba9425868dfdf090bffaafae218f7b531dda44" + dependencies: + "@types/react" "^15.0.22" + enzyme-matchers "^4.0.0" + enzyme-to-json "^3.0.0" + +jest-get-type@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-21.2.0.tgz#f6376ab9db4b60d81e39f30749c6c466f40d4a23" + +jest-haste-map@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-21.2.0.tgz#1363f0a8bb4338f24f001806571eff7a4b2ff3d8" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^21.2.0" + micromatch "^2.3.11" + sane "^2.0.0" + worker-farm "^1.3.1" + +jest-jasmine2@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-21.2.1.tgz#9cc6fc108accfa97efebce10c4308548a4ea7592" + dependencies: + chalk "^2.0.1" + expect "^21.2.1" + graceful-fs "^4.1.11" + jest-diff "^21.2.1" + jest-matcher-utils "^21.2.1" + jest-message-util "^21.2.1" + jest-snapshot "^21.2.1" + p-cancelable "^0.3.0" + +jest-matcher-utils@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-21.2.1.tgz#72c826eaba41a093ac2b4565f865eb8475de0f64" + dependencies: + chalk "^2.0.1" + jest-get-type "^21.2.0" + pretty-format "^21.2.1" + +jest-message-util@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-21.2.1.tgz#bfe5d4692c84c827d1dcf41823795558f0a1acbe" + dependencies: + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + +jest-mock@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-21.2.0.tgz#7eb0770e7317968165f61ea2a7281131534b3c0f" + +jest-regex-util@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-21.2.0.tgz#1b1e33e63143babc3e0f2e6c9b5ba1eb34b2d530" + +jest-resolve-dependencies@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-21.2.0.tgz#9e231e371e1a736a1ad4e4b9a843bc72bfe03d09" + dependencies: + jest-regex-util "^21.2.0" + +jest-resolve@^21.2.0: + version "21.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-21.2.0.tgz#068913ad2ba6a20218e5fd32471f3874005de3a6" + dependencies: + browser-resolve "^1.11.2" + chalk "^2.0.1" + is-builtin-module "^1.0.0" + +jest-runner@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-21.2.1.tgz#194732e3e518bfb3d7cbfc0fd5871246c7e1a467" + dependencies: + jest-config "^21.2.1" + jest-docblock "^21.2.0" + jest-haste-map "^21.2.0" + jest-jasmine2 "^21.2.1" + jest-message-util "^21.2.1" + jest-runtime "^21.2.1" + jest-util "^21.2.1" + pify "^3.0.0" + throat "^4.0.0" + worker-farm "^1.3.1" + +jest-runtime@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-21.2.1.tgz#99dce15309c670442eee2ebe1ff53a3cbdbbb73e" + dependencies: + babel-core "^6.0.0" + babel-jest "^21.2.0" + babel-plugin-istanbul "^4.0.0" + chalk "^2.0.1" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^21.2.1" + jest-haste-map "^21.2.0" + jest-regex-util "^21.2.0" + jest-resolve "^21.2.0" + jest-util "^21.2.1" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + strip-bom "3.0.0" + write-file-atomic "^2.1.0" + yargs "^9.0.0" + +jest-snapshot@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-21.2.1.tgz#29e49f16202416e47343e757e5eff948c07fd7b0" + dependencies: + chalk "^2.0.1" + jest-diff "^21.2.1" + jest-matcher-utils "^21.2.1" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^21.2.1" + +jest-util@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-21.2.1.tgz#a274b2f726b0897494d694a6c3d6a61ab819bb78" + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + jest-message-util "^21.2.1" + jest-mock "^21.2.0" + jest-validate "^21.2.1" + mkdirp "^0.5.1" + +jest-validate@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-21.2.1.tgz#cc0cbca653cd54937ba4f2a111796774530dd3c7" + dependencies: + chalk "^2.0.1" + jest-get-type "^21.2.0" + leven "^2.1.0" + pretty-format "^21.2.1" + +jest@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-21.2.1.tgz#c964e0b47383768a1438e3ccf3c3d470327604e1" + dependencies: + jest-cli "^21.2.1" + js-base64@^2.1.8, js-base64@^2.1.9: version "2.3.2" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.3.2.tgz#a79a923666372b580f8e27f51845c6f7e8fbfbaf" @@ -3595,7 +3986,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.5.1: +js-yaml@^3.5.1, js-yaml@^3.7.0: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: @@ -3613,6 +4004,30 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -3656,7 +4071,7 @@ json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" -json3@3.3.2, json3@^3.3.2: +json3@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" @@ -3731,6 +4146,10 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" @@ -3748,6 +4167,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" @@ -3780,41 +4208,26 @@ lodash-es@^4.2.0, lodash-es@^4.2.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" +lodash._baseisequal@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1" dependencies: - lodash._basecopy "^3.0.0" + lodash.isarray "^3.0.0" + lodash.istypedarray "^3.0.0" lodash.keys "^3.0.0" -lodash._basecopy@^3.0.0: +lodash._bindcallback@^3.0.0: version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - lodash.assign@^4.0.4, lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" -lodash.assignin@^4.0.9: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" - -lodash.bind@^4.1.4: - version "4.2.1" - resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -3827,26 +4240,10 @@ lodash.cond@^4.3.0: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" - -lodash.defaults@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" - lodash.endswith@^4.0.1: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" -lodash.filter@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" - lodash.find@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" @@ -3855,13 +4252,9 @@ lodash.findindex@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.findindex/-/lodash.findindex-4.6.0.tgz#a3245dee61fb9b6e0624b535125624bb69c11106" -lodash.flatten@^4.2.0: +lodash.flattendeep@^4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - -lodash.foreach@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" lodash.isarguments@^3.0.0: version "3.1.0" @@ -3875,6 +4268,13 @@ lodash.isboolean@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" +lodash.isequal@^3.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-3.0.4.tgz#1c35eb3b6ef0cd1ff51743e3ea3cf7fdffdacb64" + dependencies: + lodash._baseisequal "^3.0.0" + lodash._bindcallback "^3.0.0" + lodash.isfinite@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" @@ -3907,6 +4307,10 @@ lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" +lodash.istypedarray@^3.0.0: + version "3.0.6" + resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62" + lodash.keys@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" @@ -3915,15 +4319,11 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" -lodash.map@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" -lodash.merge@^4.4.0, lodash.merge@^4.6.0: +lodash.merge@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.0.tgz#69884ba144ac33fe699737a6086deffadd0f89c5" @@ -3931,22 +4331,6 @@ lodash.mergewith@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55" -lodash.pick@^4.2.1: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" - -lodash.reduce@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" - -lodash.reject@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" - -lodash.some@^4.4.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" - lodash.tail@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" @@ -3963,7 +4347,7 @@ lodash@3.7.x: version "3.7.0" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.7.0.tgz#3678bd8ab995057c07ade836ed2ef087da811d45" -lodash@^4.0.0, lodash@^4.0.1, lodash@^4.12.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4: +lodash@^4.0.0, lodash@^4.0.1, lodash@^4.12.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3971,10 +4355,6 @@ loglevel@^1.4.0, loglevel@^1.4.1: version "1.5.0" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.5.0.tgz#3863984a2c326b986fbb965f378758a6dc8a4324" -lolex@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/lolex/-/lolex-1.6.0.tgz#3a9a0283452a47d7439e72731b9e07d7386e49f6" - longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -4013,6 +4393,12 @@ make-dir@^1.0.0: dependencies: pify "^2.3.0" +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" @@ -4063,6 +4449,12 @@ media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -4095,6 +4487,10 @@ merge-source-map@^1.0.2: dependencies: source-map "^0.5.6" +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -4134,14 +4530,14 @@ mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.16, mime-types@~2.1.17, dependencies: mime-db "~1.30.0" -mime@1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" - -mime@^1.3.4: +mime@1.4.1, mime@^1.3.4: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" @@ -4160,7 +4556,7 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -4175,29 +4571,12 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" -mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" -mocha@^3.2.0: - version "3.5.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" - dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.6.8" - diff "3.2.0" - escape-string-regexp "1.0.5" - glob "7.1.1" - growl "1.9.2" - he "1.1.1" - json3 "3.3.2" - lodash.create "3.1.1" - mkdirp "0.5.1" - supports-color "3.1.2" - moment@^2.16.0: version "2.18.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" @@ -4225,10 +4604,6 @@ nan@^2.3.0, nan@^2.3.2: version "2.7.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" -native-promise-only@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/native-promise-only/-/native-promise-only-0.8.1.tgz#20a318c30cb45f71fe7adfbf7b21c99c1472ef11" - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -4239,6 +4614,14 @@ ncname@1.0.x: dependencies: xml-char-classes "^1.0.0" +nearley@^2.7.10: + version "2.11.0" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.11.0.tgz#5e626c79a6cd2f6ab9e7e5d5805e7668967757ae" + dependencies: + nomnom "~1.6.2" + railroad-diagrams "^1.0.0" + randexp "^0.4.2" + negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" @@ -4278,6 +4661,10 @@ node-gyp@^3.3.1: tar "^2.0.0" which "1" +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + node-libs-browser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" @@ -4306,6 +4693,15 @@ node-libs-browser@^2.0.0: util "^0.10.3" vm-browserify "0.0.4" +node-notifier@^5.0.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + node-pre-gyp@^0.6.30, node-pre-gyp@^0.6.36: version "0.6.38" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.38.tgz#e92a20f83416415bb4086f6d1fb78b3da73d113d" @@ -4344,6 +4740,13 @@ node-sass@^4.1.1: sass-graph "^2.1.1" stdout-stream "^1.4.0" +nomnom@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" + dependencies: + colors "0.5.x" + underscore "~1.4.4" + "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -4385,6 +4788,12 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + "npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.0, npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -4408,6 +4817,10 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.2" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.2.tgz#c5e545ab40d22a56b0326531c4beaed7a888b3ea" + nyc@10.1.2: version "10.1.2" resolved "https://registry.yarnpkg.com/nyc/-/nyc-10.1.2.tgz#ea7acaa20a235210101604f4e7d56d28453b0274" @@ -4507,7 +4920,7 @@ on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" -once@^1.3.0, once@^1.3.3: +once@^1.3.0, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -4534,7 +4947,7 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.2: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: @@ -4565,6 +4978,14 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -4576,6 +4997,14 @@ osenv@0, osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + p-limit@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" @@ -4625,7 +5054,17 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parseurl@~1.3.1, parseurl@~1.3.2: +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +parse5@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-3.0.2.tgz#05eff57f0ef4577fb144a79f8b9a967a6cc44510" + dependencies: + "@types/node" "^6.0.46" + +parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" @@ -4651,6 +5090,10 @@ path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" @@ -4659,12 +5102,6 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" -path-to-regexp@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" - dependencies: - isarray "0.0.1" - path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -4673,6 +5110,12 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + pbkdf2@^3.0.3: version "3.0.14" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.14.tgz#a35e13c64799b06ce15320f459c230e68e73bade" @@ -5011,6 +5454,13 @@ pretty-error@^2.0.2: renderkid "^2.0.1" utila "~0.4" +pretty-format@^21.2.1: + version "21.2.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-21.2.1.tgz#ae5407f3cf21066cd011aa1ba5fce7b6a2eddb36" + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.7" resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" @@ -5041,12 +5491,12 @@ prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, loose-envify "^1.3.1" object-assign "^4.1.1" -proxy-addr@~1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz#71c0ee3b102de3f202f3b64f608d173fcba1a918" +proxy-addr@~2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.2.tgz#6571504f47bb988ec8180253f85dd7e14952bdec" dependencies: - forwarded "~0.1.0" - ipaddr.js "1.4.0" + forwarded "~0.1.2" + ipaddr.js "1.5.2" prr@~0.0.0: version "0.0.0" @@ -5078,18 +5528,14 @@ q@^1.1.2: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" -qs@6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" +qs@6.5.1, qs@~6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" - query-string@^4.1.0, query-string@^4.2.2: version "4.3.4" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb" @@ -5113,6 +5559,23 @@ querystringify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" +raf@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" + dependencies: + performance-now "^2.1.0" + +railroad-diagrams@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" + +randexp@^0.4.2: + version "0.4.6" + resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" + dependencies: + discontinuous-range "1.0.0" + ret "~0.1.10" + randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" @@ -5130,6 +5593,15 @@ range-parser@^1.0.3, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + rc@^1.1.7: version "1.2.1" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" @@ -5224,17 +5696,6 @@ react-dom@^15.3.1: object-assign "^4.1.0" prop-types "^15.5.10" -react-element-to-jsx-string@^5.0.0: - version "5.0.7" - resolved "https://registry.yarnpkg.com/react-element-to-jsx-string/-/react-element-to-jsx-string-5.0.7.tgz#c663a4800a9c712115c0d8519cb0215a46a1f0f2" - dependencies: - collapse-white-space "^1.0.0" - is-plain-object "^2.0.1" - lodash "^4.17.4" - sortobject "^1.0.0" - stringify-object "2.4.0" - traverse "^0.6.6" - react-event-listener@^0.4.5: version "0.4.5" resolved "https://registry.yarnpkg.com/react-event-listener/-/react-event-listener-0.4.5.tgz#e3e895a0970cf14ee8f890113af68197abf3d0b1" @@ -5268,8 +5729,8 @@ react-router@^3.0.0: warning "^3.0.0" react-sortable-hoc@^0.6.1: - version "0.6.7" - resolved "https://registry.yarnpkg.com/react-sortable-hoc/-/react-sortable-hoc-0.6.7.tgz#e30d247bc36dd5a605430c331ac9cb50a5fa72a6" + version "0.6.8" + resolved "https://registry.yarnpkg.com/react-sortable-hoc/-/react-sortable-hoc-0.6.8.tgz#b08562f570d7c41f6e393fca52879d2ebb9118e9" dependencies: babel-runtime "^6.11.6" invariant "^2.2.1" @@ -5282,9 +5743,16 @@ react-tap-event-plugin@^2.0.1: dependencies: fbjs "^0.8.6" +react-test-renderer@15: + version "15.6.2" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-15.6.2.tgz#d0333434fc2c438092696ca770da5ed48037efa8" + dependencies: + fbjs "^0.8.9" + object-assign "^4.1.0" + react-transition-group@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.0.tgz#b51fc921b0c3835a7ef7c571c79fc82c73e9204f" + version "1.2.1" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6" dependencies: chain-function "^1.0.0" dom-helpers "^3.2.0" @@ -5322,6 +5790,13 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -5330,6 +5805,14 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + readable-stream@1.0: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -5604,6 +6087,10 @@ resolve-from@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolve@^1.1.6: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" @@ -5617,6 +6104,10 @@ restore-cursor@^1.0.1: exit-hook "^1.0.0" onetime "^1.0.0" +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" @@ -5636,6 +6127,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^2.0.0" inherits "^2.0.1" +rst-selector-parser@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.2.tgz#9927b619bd5af8dc23a76c64caef04edf90d2c65" + dependencies: + lodash.flattendeep "^4.4.0" + nearley "^2.7.10" + run-async@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" @@ -5660,9 +6158,19 @@ safe-buffer@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" -samsam@1.x, samsam@^1.1.3: - version "1.2.1" - resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.2.1.tgz#edd39093a3184370cb859243b2bdf255e7d8ea67" +sane@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.2.0.tgz#d6d2e2fcab00e3d283c93b912b7c3a20846f1d56" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^2.0.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.18.0" + optionalDependencies: + fsevents "^1.1.1" sass-graph@^2.1.1: version "2.2.4" @@ -5683,7 +6191,7 @@ sass-loader@^6.0.5: lodash.tail "^4.1.1" pify "^3.0.0" -sax@~1.2.1: +sax@^1.2.1, sax@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -5712,9 +6220,9 @@ semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" -send@0.15.6: - version "0.15.6" - resolved "https://registry.yarnpkg.com/send/-/send-0.15.6.tgz#20f23a9c925b762ab82705fe2f9db252ace47e34" +send@0.16.1: + version "0.16.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" dependencies: debug "2.6.9" depd "~1.1.1" @@ -5724,32 +6232,32 @@ send@0.15.6: etag "~1.8.1" fresh "0.5.2" http-errors "~1.6.2" - mime "1.3.4" + mime "1.4.1" ms "2.0.0" on-finished "~2.3.0" range-parser "~1.2.0" statuses "~1.3.1" serve-index@^1.7.2: - version "1.9.0" - resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.0.tgz#d2b280fc560d616ee81b48bf0fa82abed2485ce7" + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" dependencies: - accepts "~1.3.3" + accepts "~1.3.4" batch "0.6.1" - debug "2.6.8" + debug "2.6.9" escape-html "~1.0.3" - http-errors "~1.6.1" - mime-types "~2.1.15" - parseurl "~1.3.1" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" -serve-static@1.12.6: - version "1.12.6" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.6.tgz#b973773f63449934da54e5beba5e31d9f4211577" +serve-static@1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.1.tgz#4c57d53404a761d8f2e7c1e8a18a47dbf278a719" dependencies: encodeurl "~1.0.1" escape-html "~1.0.3" parseurl "~1.3.2" - send "0.15.6" + send "0.16.1" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -5767,6 +6275,10 @@ setprototypeof@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.9" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.9.tgz#98f64880474b74f4a38b8da9d3c0f2d104633e7d" @@ -5783,6 +6295,16 @@ shallow-clone@^0.1.2: lazy-cache "^0.2.3" mixin-object "^2.0.1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + shelljs@0.3.x: version "0.3.0" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" @@ -5795,11 +6317,15 @@ shelljs@^0.7.5: interpret "^1.0.0" rechoir "^0.6.2" +shellwords@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + signal-exit@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564" -signal-exit@^3.0.0, signal-exit@^3.0.1: +signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -5807,23 +6333,6 @@ simple-assign@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/simple-assign/-/simple-assign-0.1.0.tgz#17fd3066a5f3d7738f50321bb0f14ca281cc4baa" -sinon-chai@^2.9.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/sinon-chai/-/sinon-chai-2.13.0.tgz#b9a42e801c20234bfc2f43b29e6f4f61b60990c4" - -sinon@^2.1.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-2.4.1.tgz#021fd64b54cb77d9d2fb0d43cdedfae7629c3a36" - dependencies: - diff "^3.1.0" - formatio "1.2.0" - lolex "^1.6.0" - native-promise-only "^0.8.1" - path-to-regexp "^1.7.0" - samsam "^1.1.3" - text-encoding "0.6.4" - type-detect "^4.0.0" - slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -5872,12 +6381,6 @@ sort-keys@^1.0.0: dependencies: is-plain-obj "^1.0.0" -sortobject@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/sortobject/-/sortobject-1.1.1.tgz#4f695d4d44ed0a4c06482c34c2582a2dcdc2ab34" - dependencies: - editions "^1.1.1" - source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" @@ -5888,7 +6391,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3: +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0, source-map@~0.5.1, source-map@~0.5.3, source-map@~0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -5995,6 +6498,13 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" +string-length@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + dependencies: + astral-regex "^1.0.0" + strip-ansi "^4.0.0" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -6020,13 +6530,6 @@ string_decoder@~1.0.3: dependencies: safe-buffer "~5.1.0" -stringify-object@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-2.4.0.tgz#c62d11023eb21fe2d9b087be039a26df3b22a09d" - dependencies: - is-plain-obj "^1.0.0" - is-regexp "^1.0.0" - stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -6043,15 +6546,19 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" dependencies: is-utf8 "^0.2.0" -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" strip-indent@^1.0.1: version "1.0.1" @@ -6073,12 +6580,6 @@ style-loader@^0.16.1: dependencies: loader-utils "^1.0.2" -supports-color@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" - dependencies: - has-flag "^1.0.0" - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -6111,6 +6612,10 @@ symbol-observable@^1.0.1, symbol-observable@^1.0.3, symbol-observable@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + table@^3.7.8: version "3.8.3" resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" @@ -6157,14 +6662,24 @@ test-exclude@^3.3.0: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-encoding@0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19" +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" +throat@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + through@^2.3.6, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -6187,6 +6702,10 @@ tinycolor2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" @@ -6199,15 +6718,15 @@ toposort@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.4.tgz#a86107690cbee8cae43b349d2f60162500924dfc" -tough-cookie@~2.3.0, tough-cookie@~2.3.3: +tough-cookie@^2.3.2, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" dependencies: punycode "^1.4.1" -traverse@^0.6.6: - version "0.6.6" - resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" trim-newlines@^1.0.0: version "1.0.0" @@ -6241,18 +6760,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" - -type-detect@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" - -type-detect@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea" - type-is@~1.6.15: version "1.6.15" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" @@ -6269,8 +6776,8 @@ ua-parser-js@^0.7.9: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.14.tgz#110d53fa4c3f326c121292bbeac904d2e03387ca" uglify-js@3.1.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.2.tgz#b50bcf15a5fd9e9ed40afbcdef3b59d6891b291f" + version "3.1.3" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.3.tgz#d61f0453b4718cab01581f3162aa90bab7520b42" dependencies: commander "~2.11.0" source-map "~0.5.1" @@ -6296,6 +6803,10 @@ ultron@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" +underscore@~1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" + uniq@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" @@ -6310,7 +6821,7 @@ uniqs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" -unpipe@~1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -6363,15 +6874,15 @@ utila@~0.4: version "0.4.0" resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" -utils-merge@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" uuid@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" -uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0: +uuid@^3.0.0, uuid@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" @@ -6382,7 +6893,7 @@ validate-npm-package-license@^3.0.1: spdx-correct "~1.0.0" spdx-expression-parse "~1.0.0" -vary@~1.1.1, vary@~1.1.2: +vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -6404,12 +6915,25 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + warning@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" dependencies: loose-envify "^1.0.0" +watch@~0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + watchpack@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.4.0.tgz#4a1472bcbb952bd0a9bb4036801f954dfb39faac" @@ -6424,6 +6948,14 @@ wbuf@^1.1.0, wbuf@^1.7.2: dependencies: minimalistic-assert "^1.0.0" +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + webpack-bundle-analyzer@^2.7.0: version "2.9.0" resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.9.0.tgz#b58bc34cc30b27ffdbaf3d00bf27aba6fa29c6e3" @@ -6532,6 +7064,12 @@ websocket-extensions@>=0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.2.tgz#0e18781de629a18308ce1481650f67ffa2693a5d" +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + whatwg-fetch@>=0.10.0, whatwg-fetch@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" @@ -6540,6 +7078,13 @@ whatwg-fetch@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-0.9.0.tgz#0e3684c6cb9995b43efc9df03e4c365d95fd9cc0" +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + whet.extend@~0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" @@ -6548,7 +7093,11 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@1, which@^1.2.4, which@^1.2.9: +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@1, which@^1.2.12, which@^1.2.4, which@^1.2.9: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: @@ -6576,6 +7125,13 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" +worker-farm@^1.3.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -6595,6 +7151,14 @@ write-file-atomic@^1.1.4: imurmurhash "^0.1.4" slide "^1.1.5" +write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" @@ -6612,7 +7176,11 @@ xml-char-classes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/xml-char-classes/-/xml-char-classes-1.0.0.tgz#64657848a20ffc5df583a42ad8a277b4512bbc4d" -xtend@^4.0.0: +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -6636,6 +7204,12 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + yargs@^6.0.0, yargs@^6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" @@ -6672,6 +7246,24 @@ yargs@^7.0.0: y18n "^3.2.1" yargs-parser "^5.0.0" +yargs@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"