@@ -31,6 +31,8 @@ describe("TodoService", function() {
3131 expect ( todo . completed ) . toEqual ( false ) ;
3232 expect ( todo . title ) . toEqual ( data . title ) ;
3333
34+ expect ( todo ) . toMatchSnapshot ( ) ;
35+
3436 } ) ;
3537
3638 it ( 'should store a new todo on the "datasource" collection' , async function ( ) {
@@ -43,6 +45,8 @@ describe("TodoService", function() {
4345 expect ( todos . length ) . toEqual ( 1 ) ;
4446 expect ( R . last ( todos ) ) . toEqual ( todo ) ;
4547
48+ expect ( todo ) . toMatchSnapshot ( ) ;
49+
4650 } ) ;
4751
4852 it ( 'should allow you to update an existing todo' , async function ( ) {
@@ -57,6 +61,8 @@ describe("TodoService", function() {
5761 expect ( updatedTodo . title ) . toEqual ( 'Hello 2' ) ;
5862 expect ( updatedTodo . completed ) . toEqual ( todo . completed ) ;
5963
64+ expect ( updatedTodo ) . toMatchSnapshot ( ) ;
65+
6066 } ) ;
6167
6268 it ( 'should allow you to delete existing todos' , async function ( ) {
@@ -72,6 +78,8 @@ describe("TodoService", function() {
7278 expect ( deleted ) . toEqual ( true ) ;
7379 expect ( allTodos . length ) . toEqual ( 0 ) ;
7480
81+ expect ( allTodos ) . toMatchSnapshot ( ) ;
82+
7583 } ) ;
7684
7785 it ( 'should throw an error if todo id does not exist when trying to update' , async function ( ) {
@@ -84,6 +92,8 @@ describe("TodoService", function() {
8492
8593 expect ( e . message ) . toEqual ( 'Todo not found' ) ;
8694
95+ expect ( e ) . toMatchSnapshot ( ) ;
96+
8797 }
8898
8999 } ) ;
@@ -98,6 +108,8 @@ describe("TodoService", function() {
98108
99109 expect ( e . message ) . toEqual ( 'Todo not found' ) ;
100110
111+ expect ( e ) . toMatchSnapshot ( ) ;
112+
101113 }
102114
103115 } ) ;
0 commit comments