All files / nexshop-web-contents/spec/reducer scene-spec.js

100% Statements 13/13
100% Branches 0/0
100% Functions 5/5
100% Lines 13/13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 251x 1x 1x     1x   1x   1x 1x 1x   1x       1x 1x 1x   1x      
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({});
        });
    });
});