1- import {
2- zoomOut ,
3- selectPaper ,
4- deselectPaper ,
5- deselectPaperBacklink ,
6- } from "../../js/actions" ;
1+ import { zoomOut , selectPaper , deselectPaper } from "../../js/actions" ;
72
83import selectedPaperReducer from "../../js/reducers/selectedPaper" ;
94
@@ -14,7 +9,7 @@ describe("list state", () => {
149 id : "some-id" ,
1510 safe_id : "some-safe-id" ,
1611 title : "some title" ,
17- }
12+ } ;
1813 const EXPECTED_ACTION = {
1914 type : "SELECT_PAPER" ,
2015 safeId : PAPER . safe_id ,
@@ -29,13 +24,6 @@ describe("list state", () => {
2924 } ;
3025 expect ( deselectPaper ( ) ) . toEqual ( EXPECTED_ACTION ) ;
3126 } ) ;
32-
33- it ( "should create a deselect paper backlink action" , ( ) => {
34- const EXPECTED_ACTION = {
35- type : "DESELECT_PAPER_BACKLINK" ,
36- } ;
37- expect ( deselectPaperBacklink ( ) ) . toEqual ( EXPECTED_ACTION ) ;
38- } ) ;
3927 } ) ;
4028
4129 describe ( "reducers" , ( ) => {
@@ -77,21 +65,6 @@ describe("list state", () => {
7765 expect ( result ) . toEqual ( EXPECTED_STATE ) ;
7866 } ) ;
7967
80- it ( "should deselect the paper (from backlink)" , ( ) => {
81- const PAPER = {
82- safe_id : "some-id" ,
83- } ;
84-
85- const INITIAL_STATE = {
86- safeId : PAPER . safe_id ,
87- } ;
88- const EXPECTED_STATE = null ;
89-
90- const result = selectedPaperReducer ( INITIAL_STATE , deselectPaperBacklink ( ) ) ;
91-
92- expect ( result ) . toEqual ( EXPECTED_STATE ) ;
93- } ) ;
94-
9568 it ( "should deselect the paper (on zoom out)" , ( ) => {
9669 const PAPER = {
9770 safe_id : "some-id" ,
0 commit comments