Skip to content

Commit

Permalink
Add tests for legacy API detection
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Nov 3, 2017
1 parent ac5c435 commit 0a4db51
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions spec/NetworkLifecycle.coffee
Expand Up @@ -198,6 +198,32 @@ describe 'Network Lifecycle', ->
loader.registerComponent 'legacy', 'Sync', legacyBasic
done()

describe 'recognizing API level', ->
it 'should recognize legacy component as such', (done) ->
loader.load 'legacy/Sync', (err, inst) ->
return done err if err
chai.expect(inst.isLegacy()).to.equal true
done()
return
it 'should recognize WirePattern component as non-legacy', (done) ->
loader.load 'wirepattern/Async', (err, inst) ->
return done err if err
chai.expect(inst.isLegacy()).to.equal false
done()
return
it 'should recognize Process API component as non-legacy', (done) ->
loader.load 'process/Async', (err, inst) ->
return done err if err
chai.expect(inst.isLegacy()).to.equal false
done()
return
it 'should recognize Graph component as non-legacy', (done) ->
loader.load 'Graph', (err, inst) ->
return done err if err
chai.expect(inst.isLegacy()).to.equal false
done()
return

describe 'with single Process API component receiving IIP', ->
c = null
g = null
Expand Down

0 comments on commit 0a4db51

Please sign in to comment.