UNPKG

@4ex/indicators

Version:

Technical indicators for ohlc charts written in TypeScript

17 lines (16 loc) 663 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const indicators_1 = require("../../indicators"); const utils_1 = require("../../utils"); describe('FactoryIndicators', () => { describe('getClass', () => { it('should throw exception if name is not present', () => { const method = () => utils_1.FactoryIndicators.getClass('test'); expect(method).toThrowError(); }); it('should retrieve correct instance', () => { const MAClass = utils_1.FactoryIndicators.getClass('MA'); expect(typeof MAClass === typeof indicators_1.MA).toBeTruthy(); }); }); });