{"size": 865, "ext": "js", "max_stars_repo_path": "test/bundle.js", "max_stars_repo_name": "IrregularShed/apostrophe", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/bundle.js", "max_issues_repo_name": "IrregularShed/apostrophe", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/bundle.js", "max_forks_repo_name": "IrregularShed/apostrophe", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.7142857143, "max_line_length": 117, "alphanum_fraction": 0.5965317919}
const fs = require('fs');
const path = require('path');

const t = require('../test-lib/test.js');
const assert = require('assert');
let apos;

describe('Bundle', function() {

  this.timeout(t.timeout);

  before(() => {
    // bundles work only in node_modules, symlink our test bundle
    if (!fs.existsSync(path.join(__dirname, '/node_modules/test-bundle'))) {
      fs.symlinkSync(path.join(__dirname, '/test-bundle'), path.join(__dirname, '/node_modules/test-bundle'), 'dir');
    }
  });

  after(async function() {
    return t.destroy(apos);
  });

  it('should support bundle', async function() {
    apos = await t.create({
      root: module,
      modules: {
        'test-bundle': {},
        'test-bundle-sub': {}
      }
    });
    assert(apos.test && apos.test.color === 'red');
    assert(apos.subtest && apos.subtest.color === 'red');
  });
});
