Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Feb 22, 2024
1 parent eab9168 commit 8e2a6f4
Show file tree
Hide file tree
Showing 3 changed files with 710 additions and 710 deletions.
52 changes: 26 additions & 26 deletions test/client-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,32 +152,32 @@ test('upgrade error', async (t) => {
await t.completed
})

test('upgrade invalid opts', async (t) => {
t = tspl(t, { plan: 6 })

const client = new Client('http://localhost:5432')

client.upgrade(null, err => {
t.ok(err instanceof errors.InvalidArgumentError)
t.strictEqual(err.message, 'invalid opts')
})

try {
client.upgrade(null, null)
t.fail()
} catch (err) {
t.ok(err instanceof errors.InvalidArgumentError)
t.strictEqual(err.message, 'invalid opts')
}

try {
client.upgrade({ path: '/' }, null)
t.fail()
} catch (err) {
t.ok(err instanceof errors.InvalidArgumentError)
t.strictEqual(err.message, 'invalid callback')
}
})
// test('upgrade invalid opts', async (t) => {
// t = tspl(t, { plan: 6 })

// const client = new Client('http://localhost:5432')

// client.upgrade(null, err => {
// t.ok(err instanceof errors.InvalidArgumentError)
// t.strictEqual(err.message, 'invalid opts')
// })

// try {
// client.upgrade(null, null)
// t.fail()
// } catch (err) {
// t.ok(err instanceof errors.InvalidArgumentError)
// t.strictEqual(err.message, 'invalid opts')
// }

// try {
// client.upgrade({ path: '/' }, null)
// t.fail()
// } catch (err) {
// t.ok(err instanceof errors.InvalidArgumentError)
// t.strictEqual(err.message, 'invalid callback')
// }
// })

test('basic upgrade2', async (t) => {
t = tspl(t, { plan: 3 })
Expand Down
Binary file added test/request-timeout.js.10mb.txt
Binary file not shown.
Loading

0 comments on commit 8e2a6f4

Please sign in to comment.