File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 6
6
* found in the LICENSE file at https://github.com/orchejs/rest/LICENSE
7
7
*/
8
8
import { expect } from 'chai' ;
9
+ import { ParamType } from '../../lib/constants' ;
9
10
import { ParameterLoader } from '../../lib/loaders' ;
10
11
11
12
export class TestParameter {
@@ -15,11 +16,21 @@ export class TestParameter {
15
16
describe ( 'ParameterLoader' , ( ) => {
16
17
describe ( '#addParameterConfig' , ( ) => {
17
18
it (
18
- 'Should add a new parameter configuration for a ' ,
19
+ 'Should add a new parameter configuration and be able to get it ' ,
19
20
( ) => {
20
- ParameterLoader . addParameterConfig ( )
21
- const interceptorConfigs = InterceptorLoader . interceptorConfigs ;
22
- expect ( interceptorConfigs ) . length . above ( 0 ) ;
21
+ const testParam = new TestParameter ( ) ;
22
+ ParameterLoader . addParameterConfig (
23
+ testParam ,
24
+ 'testParameterMethod' ,
25
+ null ,
26
+ 1 ,
27
+ ParamType . BodyParam
28
+ ) ;
29
+ const paramConfig = ParameterLoader . getParameterConfig (
30
+ 'TestParameter' ,
31
+ 'testParameterMethod'
32
+ ) ;
33
+ expect ( paramConfig ) . to . be . not . undefined ;
23
34
} ) ;
24
35
} ) ;
25
36
} ) ;
You can’t perform that action at this time.
0 commit comments