Commit 71115427 authored by Travis Fischer's avatar Travis Fischer

test: adjust unit test timeouts

parent e1d0eb11
...@@ -8,6 +8,8 @@ dotenv.config() ...@@ -8,6 +8,8 @@ dotenv.config()
const isCI = !!process.env.CI const isCI = !!process.env.CI
test('ChatGPTAPI invalid session token', async (t) => { test('ChatGPTAPI invalid session token', async (t) => {
t.timeout(30 * 1000) // 30 seconds
t.throws(() => new ChatGPTAPI({ sessionToken: null }), { t.throws(() => new ChatGPTAPI({ sessionToken: null }), {
message: 'ChatGPT invalid session token' message: 'ChatGPT invalid session token'
}) })
...@@ -51,6 +53,7 @@ test('ChatGPTAPI valid session token', async (t) => { ...@@ -51,6 +53,7 @@ test('ChatGPTAPI valid session token', async (t) => {
if (!isCI) { if (!isCI) {
test('ChatGPTAPI expired session token', async (t) => { test('ChatGPTAPI expired session token', async (t) => {
t.timeout(30 * 1000) // 30 seconds
const expiredSessionToken = process.env.TEST_EXPIRED_SESSION_TOKEN const expiredSessionToken = process.env.TEST_EXPIRED_SESSION_TOKEN
await t.throwsAsync( await t.throwsAsync(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment