diff options
Diffstat (limited to 'test/ParserSpec.js')
| -rw-r--r-- | test/ParserSpec.js | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/test/ParserSpec.js b/test/ParserSpec.js index 641420cb..d2a1c5ba 100644 --- a/test/ParserSpec.js +++ b/test/ParserSpec.js @@ -405,9 +405,14 @@ describe('parser', function() {      });      it('should delegate arguments', function(){ -      var index = parser('index:objs').formatter()(); -      expect(index.format({objs:['A','B']}, 'B')).toEqual('1'); -      expect(index.parse({objs:['A','B']}, '1')).toEqual('B'); +      angularFormatter.myArgs = { +        parse: function(a, b){ return [a, b]; }, +        format: function(a, b){ return [a, b]; } +      }; +      var myArgs = parser('myArgs:objs').formatter()(); +      expect(myArgs.format({objs:'B'}, 'A')).toEqual(['A', 'B']); +      expect(myArgs.parse({objs:'D'}, 'C')).toEqual(['C', 'D']); +      delete angularFormatter.myArgs;      });    });  | 
