add LimitedArray
This commit is contained in:
17
test/test.limitedarray.ts
Normal file
17
test/test.limitedarray.ts
Normal 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()
|
@ -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 = {}
|
||||
|
@ -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 {
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user