wip(core): Work on part unit tests
This commit is contained in:
parent
904e0044c5
commit
cf0c70f4c6
4 changed files with 165 additions and 320 deletions
|
@ -646,7 +646,26 @@ describe('Pattern', () => {
|
|||
const pattern = new Pattern()
|
||||
const part = pattern.__createPartWithContext('test')
|
||||
expect(typeof part.context).to.equal('object')
|
||||
expect(typeof part.context.parts).to.equal('object')
|
||||
expect(typeof part.context.config).to.equal('object')
|
||||
expect(typeof part.context.config.options).to.equal('object')
|
||||
expect(typeof part.context.config.data).to.equal('object')
|
||||
expect(Array.isArray(part.context.config.measurements)).to.equal(true)
|
||||
expect(Array.isArray(part.context.config.optionalMeasurements)).to.equal(true)
|
||||
expect(Array.isArray(part.context.config.parts)).to.equal(true)
|
||||
expect(Array.isArray(part.context.config.plugins)).to.equal(true)
|
||||
expect(part.context.settings).to.equal(pattern.settings)
|
||||
expect(typeof part.context.store).to.equal('object')
|
||||
expect(typeof part.context.store.log).to.equal('object')
|
||||
expect(typeof part.context.store.log.debug).to.equal('function')
|
||||
expect(typeof part.context.store.log.info).to.equal('function')
|
||||
expect(typeof part.context.store.log.warning).to.equal('function')
|
||||
expect(typeof part.context.store.log.error).to.equal('function')
|
||||
expect(typeof part.context.store.logs).to.equal('object')
|
||||
expect(Array.isArray(part.context.store.logs.debug)).to.equal(true)
|
||||
expect(Array.isArray(part.context.store.logs.info)).to.equal(true)
|
||||
expect(Array.isArray(part.context.store.logs.warning)).to.equal(true)
|
||||
expect(Array.isArray(part.context.store.logs.error)).to.equal(true)
|
||||
})
|
||||
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue