UNPKG

metaapi.cloud-sdk

Version:

SDK for MetaApi, a professional cloud forex API which includes MetaTrader REST API and MetaTrader websocket API. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). CopyFactory copy trading API included. (https://metaapi.cloud)

44 lines (36 loc) 969 B
'use strict'; import * as assert from './assert'; import 'should'; /** * @test {assert} */ describe('assert', () => { /** * @test {assert#arrayMatchWithEqualLength} */ describe('arrayMatchWithEqualLength', () => { /** * @test {assert#arrayMatchWithEqualLength} */ it('should be possible to use matchers with pass result', () => { assert.arrayMatchWithEqualLength([{value: 1}, {value: 2}], [ {value: it => it.should.be.Number()}, {value: it => it.should.be.Number()} ]); }); /** * @test {assert#arrayMatchWithEqualLength} */ it('should be possible to use matchers with fail result', () => { try { assert.arrayMatchWithEqualLength([{value: 1}, {value: 2}], [ {value: it => it.should.be.String()}, {value: 2} ]); throw new Error('test'); } catch (err) { err.name.should.equal('AssertionError'); } }); }); });