var test = require('blue-tape');
var nebula = require('../index');

function noop() {};

test('isolation', t => {
  t.plan(nebula.defaultModules.length);

  nebula.defaultModules.forEach( m => nebula.build([m], null, {}, result => {
    t.ok(result, `Module '${m}' should work in isolation`);
  }));
});

test('modularity', t => {
  const testModules = nebula.defaultModules.filter( n => n !== 'banner');
  t.plan(testModules.length);

  testModules.forEach( m => {
    const options = {};
    options['use-' + m] = false;

    nebula.build([m], null, options, result => {
      t.ok(result.length === 0, `Module '${m}' should be empty when $${'use-' + m} is false`);
    });
  });
})

@@ -59,16 +59,49 @@
 index');
+%0Avar sass = require('node-sass');
 %0A%0Afuncti
@@ -711,8 +711,324 @@
  %7D);%0A%7D)%0A
+%0Atest('consistency', t =%3E %7B%0A  t.plan(1);%0A%0A  var libSassOutput = sass.renderSync(%7B%0A    file: require('path').join(__dirname, '../scss/nebula.scss'),%0A    outputStyle: 'compact',%0A    sourceMap: true%0A  %7D).css.toString();%0A%0A  nebula.build(null, null, %7B%7D, buildOutput =%3E %7B%0A    t.equal(buildOutput, libSassOutput);%0A  %7D);%0A%7D)%0A

add test for consistency between entry file and JS build 👊