|
|
@@ -10,7 +10,7 @@ describe('invoke()', () => {
|
|
|
it('should throw an error if URL is missing', () => {
|
|
|
expect(() => UrlBuilder.build({
|
|
|
type: QUERY_TYPE.DEFAULT
|
|
|
- })).toThrow()
|
|
|
+ })).toThrowError('no url')
|
|
|
})
|
|
|
|
|
|
it('should return the URL concat with Root URL', () => {
|
|
|
@@ -25,7 +25,7 @@ describe('invoke()', () => {
|
|
|
it('should throw an error if enumType is missing', () => {
|
|
|
expect(() => UrlBuilder.build({
|
|
|
type: QUERY_TYPE.ENUM
|
|
|
- })).toThrow()
|
|
|
+ })).toThrowError('enumType must be defined')
|
|
|
})
|
|
|
|
|
|
it('should return the Enum URL concat with Root URL', () => {
|
|
|
@@ -40,7 +40,7 @@ describe('invoke()', () => {
|
|
|
it('should throw an error if model is missing', () => {
|
|
|
expect(() => UrlBuilder.build({
|
|
|
type: QUERY_TYPE.MODEL
|
|
|
- })).toThrow()
|
|
|
+ })).toThrowError('model must be defined')
|
|
|
})
|
|
|
|
|
|
it('should return the Model URL concat with Root URL', () => {
|
|
|
@@ -61,7 +61,7 @@ describe('invoke()', () => {
|
|
|
type: QUERY_TYPE.MODEL,
|
|
|
model: User,
|
|
|
rootModel: Organization
|
|
|
- })).toThrow()
|
|
|
+ })).toThrowError('Root ID must be defined')
|
|
|
})
|
|
|
|
|
|
it('should return the Root Model URL, Model Url concat with Root URL', () => {
|
|
|
@@ -96,7 +96,7 @@ describe('invoke()', () => {
|
|
|
it('should throw an error if imgArgs is missing', () => {
|
|
|
expect(() => UrlBuilder.build({
|
|
|
type: QUERY_TYPE.IMAGE
|
|
|
- })).toThrow()
|
|
|
+ })).toThrowError('*args* is not a dataProviderArgs')
|
|
|
})
|
|
|
|
|
|
it('should return the File download URL concat with Root URL', () => {
|