Skip to content

Commit a8548d9

Browse files
committed
Fix tests based on api changes
1 parent 255ec87 commit a8548d9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/client.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ test('accepts singleton client', (t) => {
1515
const fastify = {
1616
decorate (name, obj) {
1717
t.is(name, 'oracle')
18-
t.is(obj, pool)
18+
t.is(obj.pool, pool)
1919
},
2020

2121
addHook (name, fn) {
2222
t.is(name, 'onClose')
23-
t.match(fn, /fastify\.oracle\.close/)
23+
t.match(fn, /fastify\.oracle\.pool\.close/)
2424
}
2525
}
2626

@@ -43,12 +43,12 @@ test('retrieves a cached pool', (t) => {
4343
const fastify = {
4444
decorate (name, obj) {
4545
t.is(name, 'oracle')
46-
t.is(obj, pool)
46+
t.is(obj.pool, pool)
4747
},
4848

4949
addHook (name, fn) {
5050
t.is(name, 'onClose')
51-
t.match(fn, /fastify\.oracle\.close/)
51+
t.match(fn, /fastify\.oracle\.pool\.close/)
5252
}
5353
}
5454

test/pool.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('creates usable pool from config', (t) => {
1414

1515
addHook (name, fn) {
1616
t.is(name, 'onClose')
17-
t.match(fn, /fastify\.oracle\.close/)
17+
t.match(fn, /fastify\.oracle\.pool\.close/)
1818
}
1919
}
2020

0 commit comments

Comments
 (0)