File size: 656 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { GUIDED_TOUR_UPDATE } from 'calypso/state/action-types';
import { guidedTours } from '../reducer';

describe( 'reducer', () => {
	describe( '#guidedTours()', () => {
		test( 'should default to an empty object', () => {
			const state = guidedTours( undefined, {} );
			expect( state ).toEqual( {} );
		} );

		test( 'should return expected state', () => {
			const state = guidedTours(
				{},
				{
					type: GUIDED_TOUR_UPDATE,
					tour: 'testTour',
					stepName: 'testStepName',
					isPaused: false,
				}
			);
			expect( state ).toEqual( {
				tour: 'testTour',
				stepName: 'testStepName',
				isPaused: false,
			} );
		} );
	} );
} );