Skip to content

Commit cbe1eb7

Browse files
dhensbyCopilot
andcommitted
test: reset sql.Promise after custom promise library test
The 'custom promise library' test sets sql.Promise to a FakePromise class but never restores it. This leaks into subsequent tests that rely on shared.Promise being the native Promise, causing failures when tests use _poolValidate or other code paths that create promises via the shared module. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2f39ff5 commit cbe1eb7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/common/unit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ describe('Unit', () => {
123123
sql.Promise = FakePromise
124124
sql.close().then(() => {
125125
assert.strictEqual(resolved, true)
126+
sql.Promise = Promise
126127
done()
127128
})
128129
})

0 commit comments

Comments
 (0)