Skip to content

πŸ“ˆ Get real-time stocks from TradingView

Update allErrors test for TradingView API error response format changes

Mathieu Colmonde01b93928a1
diff --git a/package-lock.json b/package-lock.json
index 4561b12..421be1f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@mathieuc/tradingview",
- "version": "3.5.1",
+ "version": "3.5.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@mathieuc/tradingview",
- "version": "3.5.1",
+ "version": "3.5.2",
"license": "ISC",
"dependencies": {
"axios": "^1.5.0",
diff --git a/tests/allErrors.test.ts b/tests/allErrors.test.ts
index 29b19db..8ea4727 100644
--- a/tests/allErrors.test.ts
+++ b/tests/allErrors.test.ts
@@ -184,13 +184,14 @@ describe('AllErrors', () => {
expect(error).toEqual([
{
ctx: {
- length: -1,
- nameInvalidValue: 'factor',
+ argName: 'factor',
bar_index: 0,
- operation: '>',
+ code: 'RE10001',
funName: '\'supertrend\'',
+ op: '>',
+ value: -1,
},
- error: 'Error on bar {bar_index}: Invalid value of the \'{nameInvalidValue}\' argument ({length}) in the \'{funName}\' function. It must be {operation} 0.',
+ error: 'Error on bar {bar_index}: Invalid value of the \'{argName}\' argument ({value}) in the \'{funName}\' function. It must be {op} 0.',
stack_trace: [{ n: '#main', p: 7 }],
},
'undefined',