import React from 'react';
import {expect} from 'chai';
import {
CREATE_SCENE
} from "../../src/action/scene";
import {scene} from "../../src/reducer/scene";
describe('Scene Reducer Spec', () => {
describe('CREATE_SCENE Action', () => {
it('scene returns "title" and "resolution"', () => {
let nextState = scene({}, {type: CREATE_SCENE, title: 'some title', resolution: 'some resolution'});
expect(nextState).to.deep.equal({title: 'some title', resolution: 'some resolution'});
});
});
describe('default Action', () => {
it('newScene returns initialState ', () => {
let nextState = scene({}, {type: undefined});
expect(nextState).to.deep.equal({});
});
});
}); |