Skip to content

Commit

Permalink
Add test for mixin in context
Browse files Browse the repository at this point in the history
  • Loading branch information
vovkasm committed Dec 16, 2016
1 parent dc2b709 commit 1c4dc18
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/stylesheets.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ describe('Stylesheet', function () {
describe('mixins', function () {
beforeEach(function () {
s.addRules({
'defaultFont': {style: {fontSize: 10, fontFamily: 'Helvetica'}}
'defaultFont': {style: {fontSize: 10, fontFamily: 'Helvetica'}},
'Intro defaultFont': {style: {fontSize: 20}}
})
s.addDefaultRules({
'Text': {mixins: ['defaultFont'], style: {horizontalMargin: 2}}
Expand Down Expand Up @@ -136,5 +137,10 @@ describe('Stylesheet', function () {
style: { fontSize: 10, fontFamily: 'Helvetica', fontWeight: 'bold' }
})
})
it('in context', function () {
expect(s.getProps('App Intro Text')).to.be.deep.equal({
style: { fontSize: 20, fontFamily: 'Helvetica', horizontalMargin: 2 }
})
})
})
})

0 comments on commit 1c4dc18

Please sign in to comment.