const assert = require('assert');
const configMergeLoader = require('../index.js');

describe('Config Merge Loader', function() {
  it('should return a function', function() {
    assert.equal(typeof configMergeLoader, 'function');
  });

  describe('when called', function() {
    const loaderInput = 'Loader Content';

    it('should return as string', function() {
      const loaderResult = configMergeLoader(loaderInput);
      assert.equal(typeof loaderResult, 'string');
    });

    it('should return the same string it is given', function() {
      const loaderResult = configMergeLoader(loaderInput);
      assert.ok(loaderResult.indexOf(loaderInput) >= 0);
    });
  });
});

@@ -76,16 +76,78 @@
 ex.js');
+%0Aconst fs = require('fs');%0Aconst webpack = require('webpack');
 %0A%0Adescri
@@ -736,13 +736,186 @@
 );%0A  %7D);
+%0A%0A  describe('when called via webapck', function() %7B%0A    it('should generate an entry.js file', function() %7B%0A      assert.ok(fs.existsSync('./dist/entry.js'));%0A    %7D);%0A  %7D);
 %0A%7D);%0A

Test for existence of generated file