File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
packages/installations/src/api Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import { expect } from 'chai' ;
19
19
import { getId } from './get-id' ;
20
- import { FAKE_INSTALLATIONS_ID , getFakeInstallations , getFakeServerApp } from '../testing/fake-generators' ;
20
+ import {
21
+ FAKE_INSTALLATIONS_ID ,
22
+ getFakeInstallations ,
23
+ getFakeServerApp
24
+ } from '../testing/fake-generators' ;
21
25
22
26
describe ( 'getId-serverapp' , ( ) => {
23
- it ( 'getId with firebaseServerApp with authIdToken returns valid id' , async ( ) => {
24
- const installationsAuthToken = " fakeToken" ;
27
+ it ( 'getId with firebaseServerApp with authIdToken returns valid id' , async ( ) => {
28
+ const installationsAuthToken = ' fakeToken' ;
25
29
const serverApp = getFakeServerApp ( installationsAuthToken ) ;
26
30
const installations = getFakeInstallations ( serverApp ) ;
27
31
const fid = await getId ( installations ) ;
28
32
expect ( fid ) . to . equal ( FAKE_INSTALLATIONS_ID ) ;
29
33
} ) ;
30
- it ( 'getId with firebaseServerApp without authIdToken throws' , async ( ) => {
34
+ it ( 'getId with firebaseServerApp without authIdToken throws' , async ( ) => {
31
35
const serverApp = getFakeServerApp ( ) ;
32
36
const installations = getFakeInstallations ( serverApp ) ;
33
37
let fails = false ;
34
38
try {
35
39
await getId ( installations ) ;
36
- } catch ( e ) {
40
+ } catch ( e ) {
37
41
console . error ( e ) ;
38
42
fails = true ;
39
43
}
Original file line number Diff line number Diff line change 17
17
18
18
import { expect , use } from 'chai' ;
19
19
import { getToken } from './get-token' ;
20
- import { getFakeInstallations , getFakeServerApp } from '../testing/fake-generators' ;
20
+ import {
21
+ getFakeInstallations ,
22
+ getFakeServerApp
23
+ } from '../testing/fake-generators' ;
21
24
import chaiAsPromised from 'chai-as-promised' ;
22
25
23
26
use ( chaiAsPromised ) ;
24
27
25
28
describe ( 'getToken-serverapp' , ( ) => {
26
29
it ( 'getToken with firebaseServerApp with authIdToken returns valid token' , async ( ) => {
27
- const installationsAuthToken = " fakeToken.abc123" ;
30
+ const installationsAuthToken = ' fakeToken' ;
28
31
const serverApp = getFakeServerApp ( installationsAuthToken ) ;
29
32
const installations = getFakeInstallations ( serverApp ) ;
30
33
const token = await getToken ( installations ) ;
@@ -36,7 +39,7 @@ describe('getToken-serverapp', () => {
36
39
let fails = false ;
37
40
try {
38
41
await getToken ( installations ) ;
39
- } catch ( e ) {
42
+ } catch ( e ) {
40
43
fails = true ;
41
44
}
42
45
expect ( fails ) . to . be . true ;
You can’t perform that action at this time.
0 commit comments