Skip to content

Commit 69239d4

Browse files
committed
test: named export
1 parent a09f6ab commit 69239d4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/index.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import login from '../src/index'
1+
import { oauthLoginUrl } from '../src/index'
22

33
beforeAll(() => {
44
Math.random = jest.fn(() => 0.123)
@@ -8,8 +8,8 @@ beforeAll(() => {
88
// Math.random.mockRestore()
99
// });
1010

11-
test('login({clientId: "1234567890abcdef1234"})', () => {
12-
expect(login({
11+
test('oauthLoginUrl({clientId: "1234567890abcdef1234"})', () => {
12+
expect(oauthLoginUrl({
1313
clientId: '1234567890abcdef1234'
1414
})).toEqual({
1515
allowSignup: true,
@@ -22,8 +22,8 @@ test('login({clientId: "1234567890abcdef1234"})', () => {
2222
})
2323
})
2424

25-
test('login({clientId: "4321fedcba0987654321"})', () => {
26-
expect(login({
25+
test('oauthLoginUrl({clientId: "4321fedcba0987654321"})', () => {
26+
expect(oauthLoginUrl({
2727
clientId: '4321fedcba0987654321'
2828
})).toEqual({
2929
allowSignup: true,
@@ -37,7 +37,7 @@ test('login({clientId: "4321fedcba0987654321"})', () => {
3737
})
3838

3939
test('redirectUrl option', () => {
40-
expect(login({
40+
expect(oauthLoginUrl({
4141
clientId: '1234567890abcdef1234',
4242
redirectUrl: 'https://example.com'
4343
})).toEqual({
@@ -52,7 +52,7 @@ test('redirectUrl option', () => {
5252
})
5353

5454
test('login option', () => {
55-
expect(login({
55+
expect(oauthLoginUrl({
5656
clientId: '1234567890abcdef1234',
5757
login: 'octocat'
5858
})).toEqual({
@@ -67,7 +67,7 @@ test('login option', () => {
6767
})
6868

6969
test('scopes = []', () => {
70-
expect(login({
70+
expect(oauthLoginUrl({
7171
clientId: '1234567890abcdef1234',
7272
login: 'octocat',
7373
scopes: []
@@ -83,7 +83,7 @@ test('scopes = []', () => {
8383
})
8484

8585
test('scopes = ""', () => {
86-
expect(login({
86+
expect(oauthLoginUrl({
8787
clientId: '1234567890abcdef1234',
8888
login: 'octocat',
8989
scopes: ''
@@ -99,7 +99,7 @@ test('scopes = ""', () => {
9999
})
100100

101101
test('scopes = "user,public_repo, gist notifications"', () => {
102-
expect(login({
102+
expect(oauthLoginUrl({
103103
clientId: '1234567890abcdef1234',
104104
login: 'octocat',
105105
scopes: 'user,public_repo, gist notifications'
@@ -115,7 +115,7 @@ test('scopes = "user,public_repo, gist notifications"', () => {
115115
})
116116

117117
test('allowSignup = false', () => {
118-
expect(login({
118+
expect(oauthLoginUrl({
119119
allowSignup: false,
120120
clientId: '1234567890abcdef1234',
121121
login: 'octocat',

0 commit comments

Comments
 (0)