add LimitedArray

This commit is contained in:
2017-09-21 22:54:22 +02:00
parent 38884ff59c
commit e59205490b
12 changed files with 118 additions and 6 deletions

17
test/test.limitedarray.ts Normal file
View File

@ -0,0 +1,17 @@
import { tap, expect } from 'tapbundle'
import { LimitedArray } from '../ts/index'
let testLimitedArray: LimitedArray<string>
tap.test('should create a LimitedArray', async () => {
testLimitedArray = new LimitedArray(6)
expect(testLimitedArray).to.be.instanceof(LimitedArray)
})
tap.test('should never be longer than the set length', async () => {
testLimitedArray.addMany(['hi','this','is','quite','a','long','string',':)'])
expect(testLimitedArray.array.length).to.be.lessThan(7)
})
tap.start()

View File

@ -5,7 +5,7 @@ import * as rx from 'rxjs/Rx'
import * as smartq from 'smartq'
// import the module
import lik = require('../ts/index')
import * as lik from '../ts/index'
let object1 = {}
let object2 = {}

View File

@ -5,7 +5,7 @@ import * as rx from 'rxjs/Rx'
import * as smartq from 'smartq'
// import the module
import lik = require('../ts/index')
import * as lik from '../ts/index'
// Objectmap
interface ITestObject {

View File

@ -5,7 +5,7 @@ import * as rx from 'rxjs/Rx'
import * as smartq from 'smartq'
// import the module
import lik = require('../ts/index')
import * as lik from '../ts/index'
let testObservablemap: lik.Observablemap
let testObservable1: rx.Observable<any>

View File

@ -5,7 +5,7 @@ import * as rx from 'rxjs/Rx'
import * as smartq from 'smartq'
// import the module
import lik = require('../ts/index')
import * as lik from '../ts/index'
// testData
let testStringmap: lik.Stringmap