From 1c754e98f264ec9a54d382ef6da38dad963d03fc Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Fri, 27 Feb 2015 16:08:55 -0800 Subject: [PATCH] fix build breakage on Rhino parser --- test/specs/documentation/restparams.js | 35 ++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/test/specs/documentation/restparams.js b/test/specs/documentation/restparams.js index bf30079b..a1773676 100644 --- a/test/specs/documentation/restparams.js +++ b/test/specs/documentation/restparams.js @@ -1,21 +1,24 @@ 'use strict'; -describe('rest parameters', function() { - var docSet = jasmine.getDocSetFromFile('test/fixtures/restparams.js'); - var setAdmins = docSet.getByLongname('setAdmins')[0]; - var setWidgetAccess = docSet.getByLongname('setWidgetAccess')[0]; +// Rhino can't handle rest parameters +if (jasmine.jsParser !== 'rhino') { + describe('rest parameters', function() { + var docSet = jasmine.getDocSetFromFile('test/fixtures/restparams.js'); + var setAdmins = docSet.getByLongname('setAdmins')[0]; + var setWidgetAccess = docSet.getByLongname('setWidgetAccess')[0]; - it('should automatically mark standalone rest parameters as repeatable', function() { - var restParam = setAdmins.params[0]; + it('should automatically mark standalone rest parameters as repeatable', function() { + var restParam = setAdmins.params[0]; - expect(restParam.name).toBe('users'); - expect(restParam.variable).toBe(true); + expect(restParam.name).toBe('users'); + expect(restParam.variable).toBe(true); + }); + + it('should automatically mark rest parameters as repeatable when they are mixed with other params', function() { + var restParam = setWidgetAccess.params[1]; + + expect(restParam.name).toBe('users'); + expect(restParam.variable).toBe(true); + }); }); - - it('should automatically mark rest parameters as repeatable when they are mixed with other params', function() { - var restParam = setWidgetAccess.params[1]; - - expect(restParam.name).toBe('users'); - expect(restParam.variable).toBe(true); - }); -}); +}