@@ -205,7 +205,7 @@ describe('Builder', function() {
205205
206206 expect ( result . query ) . to . be . equal ( 'select * from "users" where "name" = $1;' ) ;
207207 expect ( result . values ) . to . be . eql ( [ 'John' ] ) ;
208- } ) ;
208+ } ) ;
209209
210210 it ( 'should use prefix `@` for values with option `valuesPrefix` = @' , function ( ) {
211211 jsonSql . configure ( {
@@ -219,7 +219,7 @@ describe('Builder', function() {
219219
220220 expect ( result . query ) . to . be . equal ( 'select * from "users" where "name" = @p1;' ) ;
221221 expect ( result . values ) . to . be . eql ( { p1 : 'John' } ) ;
222- } ) ;
222+ } ) ;
223223
224224 it ( 'should return prefixed values with method `prefixValues`' , function ( ) {
225225 var result = jsonSql . build ( {
@@ -230,7 +230,7 @@ describe('Builder', function() {
230230 expect ( result . query ) . to . be . equal ( 'select * from "users" where "name" = @p1;' ) ;
231231 expect ( result . values ) . to . be . eql ( { p1 : 'John' } ) ;
232232 expect ( result . prefixValues ( ) ) . to . be . eql ( { '@p1' : 'John' } ) ;
233- } ) ;
233+ } ) ;
234234
235235 it ( 'should return array values with method `getValuesArray`' , function ( ) {
236236 var result = jsonSql . build ( {
@@ -260,26 +260,23 @@ describe('Builder', function() {
260260 expect ( result . values ) . to . be . eql ( [ 'John' ] ) ;
261261 expect ( result . prefixValues ( ) ) . to . be . eql ( { '$1' : 'John' } ) ;
262262 expect ( result . getValuesObject ( ) ) . to . be . eql ( { 1 : 'John' } ) ;
263- } ) ;
264-
265- it ( 'should throw if `indexedValues = false` and `namedValues = true`' , function ( ) {
266- jsonSql . configure ( {
267- namedValues : true ,
268- indexedValues : false
269- } ) ;
263+ } ) ;
270264
271- expect ( function ( ) {
272- jsonSql . build ( {
273- table : 'users' ,
274- condition : { name : 'John' }
275- } ) ;
276- } ) . to . throw ( 'Use of options "indexedValues: false" is ' +
277- 'not allowed together with "namedValues: true"' ) ;
265+ it ( 'should throw if `indexedValues = false` and `namedValues = true`' , function ( ) {
266+ expect ( function ( ) {
267+ jsonSql . configure ( {
268+ namedValues : true ,
269+ indexedValues : false
270+ } ) ;
271+ } ) . to . throw (
272+ 'Option `indexedValues`: false is not allowed ' +
273+ 'together with option `namedValues`: true'
274+ ) ;
278275 } ) ;
279-
280- it ( 'should not use index for values with option `indexedValues` = false' , function ( ) {
281- jsonSql . configure ( {
282- namedValues : false ,
276+
277+ it ( 'should not use index for values with option `indexedValues` = false' , function ( ) {
278+ jsonSql . configure ( {
279+ namedValues : false ,
283280 indexedValues : false
284281 } ) ;
285282
0 commit comments