From 4343fdb0eb7dd14c6795cfb467d4cc8c2478ef11 Mon Sep 17 00:00:00 2001 From: Dmitriy Yurov Date: Mon, 1 May 2023 10:27:42 +0300 Subject: [PATCH] fix test for adx (local moment 1st value issue) --- tests/adx/adx.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/adx/adx.spec.ts b/tests/adx/adx.spec.ts index 8a58ae1..aa0b085 100644 --- a/tests/adx/adx.spec.ts +++ b/tests/adx/adx.spec.ts @@ -14,7 +14,7 @@ describe('ADX', () => { // @ts-ignore typing error? const cross = adx2.nextValue({ high: tick.h, low: tick.l, close: tick.c }); - if (local && cross && localMoment) { + if (local && cross && localMoment?.adx) { expect(local.adx).toEqual(cross.adx); expect(local.mdi).toEqual(cross.mdi); expect(local.pdi).toEqual(cross.pdi);