@@ -163,7 +163,7 @@ describe('QueryBuilder', () => {
163163
164164
165165 describe ( '.transformIncomingData' , ( ) => {
166- it ( 'transforms incoming data into Vuex-ORM a readable structure' , ( ) => {
166+ it ( 'transforms incoming data into a Vuex-ORM readable structure' , ( ) => {
167167 const incomingData = {
168168 "contracts" : {
169169 "nodes" : [
@@ -218,8 +218,10 @@ describe('QueryBuilder', () => {
218218 const expectedData = {
219219 "contracts" : [
220220 {
221+ "$isPersisted" : true ,
221222 "contractOptions" : [
222223 {
224+ "$isPersisted" : true ,
223225 "description" : "Very foo, much more bar" ,
224226 "id" : 1 ,
225227 "name" : "Foo Bar 1" ,
@@ -231,8 +233,10 @@ describe('QueryBuilder', () => {
231233 "slug" : "contract-s" ,
232234 } ,
233235 {
236+ "$isPersisted" : true ,
234237 "contractOptions" : [
235238 {
239+ "$isPersisted" : true ,
236240 "description" : "Very foo, much more bar" ,
237241 "id" : 1 ,
238242 "name" : "Foo Bar 1" ,
@@ -244,8 +248,10 @@ describe('QueryBuilder', () => {
244248 "slug" : "contract-m" ,
245249 } ,
246250 {
251+ "$isPersisted" : true ,
247252 "contractOptions" : [
248253 {
254+ "$isPersisted" : true ,
249255 "description" : "Very foo, much more bar" ,
250256 "id" : 1 ,
251257 "name" : "Foo Bar 1" ,
@@ -266,7 +272,7 @@ describe('QueryBuilder', () => {
266272
267273
268274 describe ( '.transformIncomingData' , ( ) => {
269- it ( 'transforms incoming data after a mutation into Vuex-ORM a readable structure' , ( ) => {
275+ it ( 'transforms incoming data after a mutation into a Vuex-ORM readable structure' , ( ) => {
270276 const incomingData = {
271277 "createContract" : {
272278 "id" : "1" ,
@@ -286,8 +292,10 @@ describe('QueryBuilder', () => {
286292 } ;
287293 const expectedData = {
288294 "contract" : {
295+ "$isPersisted" : true ,
289296 "contractOptions" : [
290297 {
298+ "$isPersisted" : true ,
291299 "description" : "Very foo, much more bar" ,
292300 "id" : 1 ,
293301 "name" : "Foo Bar 1" ,
@@ -301,7 +309,9 @@ describe('QueryBuilder', () => {
301309 } ;
302310
303311 const model = vuexOrmApollo . context . getModel ( 'contract' ) ;
304- expect ( queryBuilder . transformIncomingData ( incomingData , model , true ) ) . toEqual ( expectedData ) ;
312+ const transformedData = queryBuilder . transformIncomingData ( incomingData , model , true ) ;
313+
314+ expect ( transformedData ) . toEqual ( expectedData ) ;
305315 } ) ;
306316 } ) ;
307317
0 commit comments