Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (27 sloc) 1021 Bytes

Mounted

Barista's mounted testing method is useful for tests that require DOM-based computed styles.

var expect = require('chai').expect;
var barista = require('seed-barista');

describe('harry component styles', function() {
  it('should render a class of wizard + harry', function() {
    var output = barista({ file: '_wizard.scss' }).mount();
    var rule = output.find('.your-a-wizard.harry');

    expect(rule.prop('background')).to.equal('red');
    expect(rule.prop('color')).to.equal('yellow');
  });
});

barista(options).mount()

Argument Type Description
options object Options for Barista.

See a full list of options

Mounted API

Barista's Mounted API uses jQuery to retrieve computed CSS styles.