Vincent GUFFON il y a 4 ans
Parent
commit
285005a362

+ 1 - 0
services/connection/connection.ts

@@ -41,6 +41,7 @@ class Connection{
 
           return this.put(url, args.id, args.data)
         }
+        else throw new Error('args not a dataPersisterArgs')
 
       case HTTP_METHOD.DELETE:
         return this.deleteItem(url, args.id)

+ 1 - 2
test/fixture/models/Organization.ts

@@ -1,5 +1,4 @@
-import {Attr, Str} from "@vuex-orm/core";
-import {Model} from "~/models/Model";
+import {Attr, Str, Model} from "@vuex-orm/core";
 
 export default class Organization extends Model {
   static entity = 'organizations'

+ 1 - 2
test/fixture/models/User.ts

@@ -1,5 +1,4 @@
-import {Attr, Str} from "@vuex-orm/core";
-import {Model} from "~/models/Model";
+import {Attr, Str, Model} from "@vuex-orm/core";
 
 export default class User extends Model {
   static entity = 'users'

+ 1 - 1
test/services/connection/connection.spec.ts

@@ -45,7 +45,7 @@ describe('invoke()', () => {
   })
 
   describe('put()',  () => {
-    it('should throw an error if data missing', () => {
+    it('should throw an error if data missing', async() => {
       expect( () => $connection.invoke(HTTP_METHOD.PUT, 'users', {type: QUERY_TYPE.MODEL})).toThrow()
     })
 

+ 1 - 1
test/services/serializer/denormalizer/baseDenormalizer.spec.ts

@@ -5,6 +5,6 @@ class DummyDenormalizer extends BaseDenormalizer{}
 
 describe('support()', () =>{
   it('should trow an error if support doesnt defined in DummyDenormalizer', () =>{
-    expect(() => DummyDenormalizer.support(DENORMALIZER_TYPE.DEFAULT)).toThrow()
+    expect(() => DummyDenormalizer.support(DENORMALIZER_TYPE.HYDRA)).toThrow()
   })
 })

+ 2 - 2
test/services/serializer/denormalizer/hydra.spec.ts

@@ -3,8 +3,8 @@ import {AnyJson} from "~/types/interfaces";
 import {DENORMALIZER_TYPE} from "~/types/enums";
 
 describe('support()', () => {
-  it('should support model default type', () =>{
-    expect(Hydra.support(DENORMALIZER_TYPE.DEFAULT)).toBeTruthy()
+  it('should support model hydra type', () =>{
+    expect(Hydra.support(DENORMALIZER_TYPE.HYDRA)).toBeTruthy()
   })
 
   it('should not support yaml type', () =>{

+ 2 - 2
test/services/serializer/denormalizer/yaml.spec.ts

@@ -6,8 +6,8 @@ describe('support()', () => {
     expect(Yaml.support(DENORMALIZER_TYPE.YAML)).toBeTruthy()
   })
 
-  it('should not support default type', () =>{
-    expect(Yaml.support(DENORMALIZER_TYPE.DEFAULT)).toBeFalsy()
+  it('should not support hydra type', () =>{
+    expect(Yaml.support(DENORMALIZER_TYPE.HYDRA)).toBeFalsy()
   })
 })