Blame view

node_modules/renderkid/test/Layout.coffee 394 Bytes
aaac7fed   liuqimichale   add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  Layout = require '../src/Layout'
  
  describe "Layout", ->
    describe "constructor()", ->
      it "should create root block", ->
        l = new Layout
        expect(l._root).to.exist
        l._root._name.should.equal '__root'
  
    describe "get()", ->
      it "should not be allowed when any block is open", ->
        l = new Layout
        l.openBlock()
        (->
          l.get()
        ).should.throw Error