Skip to content

Commit 1f126b3

Browse files
committed
chore: fixed auth tests to reflect interface change
1 parent ff3d399 commit 1f126b3

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

package-lock.json

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@supabase/supabase-js",
3-
"version": "0.34.4",
3+
"version": "0.34.5",
44
"description": "Supabase Realtime API",
55
"main": "./lib/index.js",
66
"scripts": {

test/integration/testAuth.js

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,15 @@ chai.use(require('chai-as-promised'))
88
const SUPABASE_URL = process.env.SUPABASE_URL || 'http://localhost:1234'
99
const SUPABASE_KEY = process.env.SUPABASE_KEY || 'examplekey'
1010

11-
console.log('SUPABASE_KEY', SUPABASE_KEY)
12-
1311
describe('test signing up and logging in as a new user', () => {
14-
const supabase = createClient(
15-
'https://nuaqAUDnliweFqRoinst.supabase.net',
16-
'ucHLLNUUFXVn2o6pRCcQOW82KF0RAs'
17-
)
12+
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
1813
const randomEmail = `a${Math.random()}@google.com`
1914

2015
it('should register a new user', async () => {
2116
try {
2217
const response = await supabase.auth.signup(randomEmail, '11password')
23-
console.log('response', response)
24-
const {body:countries} = await supabase.from('countries').select('*').limit(1)
25-
console.log('countries', countries)
26-
assert(response.email === randomEmail, 'user could not sign up')
18+
assert(response.body.email === randomEmail, 'user could not sign up')
2719
} catch (error) {
28-
// console.log('error', error)
2920
assert(!error, 'sign up returns an error')
3021
}
3122
})
@@ -35,7 +26,6 @@ describe('test signing up and logging in as a new user', () => {
3526
const response = await supabase.auth.login(randomEmail, '11password')
3627
assert(response.body.access_token !== undefined, 'user could not log in')
3728
} catch (error) {
38-
// console.log('error', error)
3929
assert(!error, 'log in returns an error')
4030
}
4131
})
@@ -45,7 +35,6 @@ describe('test signing up and logging in as a new user', () => {
4535
const user = await supabase.auth.user()
4636
assert(user.email === randomEmail, 'user could not be retrieved')
4737
} catch (error) {
48-
// console.log('error', error)
4938
assert(!error, 'logged in user returns an error')
5039
}
5140
})

0 commit comments

Comments
 (0)