File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,33 @@ describe('Test update Api', function () {
2020 } )
2121 } ) ;
2222
23+ it ( 'update with where large ' , function ( done ) {
24+ // Create a string of 'a' repeated 10,485,760 times
25+ let largeString = 'a' . repeat ( 10485760 ) ; // 10 MB in size
26+ con . update ( {
27+ in : "Customers" ,
28+ set : {
29+ contactName : largeString ,
30+ } ,
31+ where : {
32+ customerId : 1
33+ }
34+ } ) . then ( function ( results ) {
35+ con . select ( {
36+ from : "Customers" ,
37+ where : {
38+ customerId : 1
39+ }
40+ } ) . then ( function ( selectResults ) {
41+ expect ( selectResults ) . to . be . an ( 'array' ) . length ( 1 ) ;
42+ expect ( selectResults [ 0 ] . contactName ) . to . be . an ( 'string' ) . to . equal ( largeString ) ;
43+ done ( ) ;
44+ } ) ;
45+ } ) . catch ( function ( err ) {
46+ done ( err ) ;
47+ } ) ;
48+ } ) ;
49+
2350 it ( 'update with where - invalid column in where' , function ( done ) {
2451 con . update ( {
2552 in : "Customers" ,
@@ -646,4 +673,4 @@ describe('Test update Api', function () {
646673 done ( ) ;
647674 } )
648675 } ) ;
649- } ) ;
676+ } ) ;
You can’t perform that action at this time.
0 commit comments