Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to treeForAddonTestSupport #87

Closed
rwjblue opened this issue Mar 29, 2017 · 0 comments
Closed

Switch to treeForAddonTestSupport #87

rwjblue opened this issue Mar 29, 2017 · 0 comments

Comments

@rwjblue
Copy link
Contributor

rwjblue commented Mar 29, 2017

This is what we do in ember-native-dom-helpers:

  treeForAddonTestSupport(tree) {
    // intentionally not calling _super here
    // so that can have our `import`'s be
    // import { click, fillIn } from 'ember-native-dom-helpers';

    const Funnel = require('broccoli-funnel');

    let namespacedTree = new Funnel(tree, {
      srcDir: '/',
      destDir: `/${this.moduleName()}`,
      annotation: `Addon#treeForTestSupport (${this.name})`,
    });

    return this.preprocessJs(namespacedTree, '/', this.name, {
      registry: this.registry,
    });
  }

The benefit here is that this will now put the code in test-support.js instead of vendor.js. This allows building prod for deployment including tests (for testing against a live site for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants