/*jshint node:true, laxcomma:true */
/* global describe, it */
'use strict';
var assert = require('assert')
  , JBJ = require('jbj')
  , examples = require('./examples.json');

JBJ.use(require('../lib/'));


describe('IST', function () {
  Object.keys(examples).forEach(function (example) {
    it(example, function (done) {
      var input      = examples[example].input;
      var stylesheet = examples[example].stylesheet;
      var expected   = examples[example].expected;
      JBJ.render(stylesheet, input, function (err, output) {
        assert.deepEqual(output, expected);
        done(err);
      });
    });
  });
});

/*jshint node:true, laxcomma:true */
/* global describe, it */
'use strict';
var assert = require('assert')
  , JBJ = require('jbj')
  , examples = require('./examples.json');

JBJ.use(require('../lib/'));


describe('IST', function () {
  Object.keys(examples).forEach(function (example) {
    it(example, function (done) {
      var input      = examples[example].input;
      var stylesheet = examples[example].stylesheet;
      var expected   = examples[example].expected;
      JBJ.render(stylesheet, input, function (err, output) {
        try {
          assert.deepEqual(output, expected);
          done(err);
        }
        catch(e) {
          done(e);
        }
      });
    });
  });
});

Fix tests: no more time out.
:bug: Fix tests: no more time out.
