11import { CredentialManager } from '@atcute/client' ;
22import { describe , expect , it } from 'vitest' ;
3- import { Tsky } from './index' ;
3+ import { Tsky } from '~/index' ;
4+
5+ const formatSecret = ( secret : string | undefined ) =>
6+ secret ?. replace ( / ^ t s k y / g, '' ) . trim ( ) ?? '' ;
47
58const env = process . env ;
69const TEST_CREDENTIALS = {
710 alice : {
811 handle : 'alice.tsky.dev' ,
912 did : 'did:plc:jguhdmnjclquqf5lsvkyxqy3' ,
10- appPassword : env . ALICE_APP_PASSWORD ?? '' ,
13+ appPassword : formatSecret ( env . ALICE_APP_PASSWORD ) ,
1114 } ,
1215 bob : {
1316 handle : 'bob.tsky.dev' ,
1417 did : 'did:plc:2ig7akkyfq256j42uxvc4g2h' ,
15- appPassword : env . BOB_APP_PASSWORD ?? '' ,
18+ appPassword : formatSecret ( env . BOB_APP_PASSWORD ) ,
1619 } ,
1720} ;
1821
@@ -26,7 +29,7 @@ async function getAliceTsky() {
2629 return new Tsky ( manager ) ;
2730}
2831
29- describe ( 'tSky ' , ( ) => {
32+ describe ( 'bsky ' , ( ) => {
3033 it ( '.profile()' , async ( ) => {
3134 const tsky = await getAliceTsky ( ) ;
3235 const profile = await tsky . bsky . profile ( TEST_CREDENTIALS . alice . did ) ;
0 commit comments