File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { describe , it , expect } from 'vitest' ;
22import TradingView from '../main' ;
33
4- const token = process . env . SESSION as string ;
5- const signature = process . env . SIGNATURE as string ;
4+ const token = < string > process . env . SESSION ;
5+ const signature = < string > process . env . SIGNATURE ;
66
77describe ( 'AllErrors' , ( ) => {
88 const waitForError = ( instance : any ) => new Promise < string [ ] > ( ( resolve ) => {
@@ -154,10 +154,15 @@ describe('AllErrors', () => {
154154 ) . rejects . toThrow ( 'Inexistent or unsupported indicator: "undefined"' ) ;
155155 } ) ;
156156
157- it ( 'throws an error when setting an invalid study option value' , async ( ) => {
157+ it . skipIf (
158+ ! token || ! signature ,
159+ ) ( 'throws an error when setting an invalid study option value' , async ( ) => {
158160 console . log ( 'Testing "Invalid value" error:' ) ;
159161
160- const client = new TradingView . Client ( ) ;
162+ const client = new TradingView . Client ( {
163+ token,
164+ signature,
165+ } ) ;
161166 const chart = new client . Session . Chart ( ) ;
162167
163168 chart . setMarket ( 'BINANCE:BTCEUR' ) ; // Set a market
You can’t perform that action at this time.
0 commit comments