File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,8 @@ describe('benchmark', () => {
101
101
const startedOn = new Date ( )
102
102
const result = await runScript ( connection , database , testFile )
103
103
const elapsedMs = new Date ( ) . getTime ( ) - startedOn . getTime ( )
104
- console . debug ( `${ testFile } on ${ database } took ${ elapsedMs } ms\n` , result )
104
+
105
+ // console.debug(`${testFile} on ${database} took ${elapsedMs}ms\n`, result)
105
106
}
106
107
107
108
await destroyDatabaseAsync ( connection , database )
Original file line number Diff line number Diff line change @@ -14,13 +14,17 @@ describe('Database.run', () => {
14
14
it (
15
15
'simple update' ,
16
16
done => {
17
- // const updateSql = "UPDATE people SET name = 'Charlie Brown' WHERE id = 3; UPDATE people SET name = 'David Bowie' WHERE id = 4; "
18
17
const updateSql = "UPDATE people SET name = 'Charlie Brown' WHERE id = 3; UPDATE people SET name = 'David Bowie' WHERE id = 4; "
19
18
20
19
// lambda callback would "hide" this
21
20
function plainCallbackNotALambda ( err : Error , results : any ) {
22
21
expect ( err ) . toBeNull ( )
23
- expect ( results ) . toBeUndefined ( )
22
+ expect ( results ) . toEqual ( {
23
+ lastID : 20 ,
24
+ changes : 1 ,
25
+ totalChanges : 22 ,
26
+ finalized : 1
27
+ } )
24
28
25
29
// Database.run should return number of rows modified and lastID
26
30
// @ts -expect-error
@@ -74,7 +78,12 @@ describe('Database.run', () => {
74
78
// lambda callback would "hide" this
75
79
function plainCallbackNotALambdaTwo ( err : Error , results : any ) {
76
80
expect ( err ) . toBeNull ( )
77
- expect ( results ) . toBeUndefined ( )
81
+ expect ( results ) . toEqual ( {
82
+ lastID : 22 ,
83
+ changes : 1 ,
84
+ totalChanges : 22 ,
85
+ finalized : 1
86
+ } )
78
87
79
88
// Database.run should return number of rows modified and lastID
80
89
// @ts -expect-error
You can’t perform that action at this time.
0 commit comments