ember-test-container

0.1.0 • Public • Published

Ember-test-container

Light-weight container for unit testing objects that rely on Ember's container.

Installation

npm install ember-test-container --save-dev

Usage

In any unit test import and use the buildContainer function

import Ember from 'ember';
import { module, test } from 'qunit';
import buildContainer from 'dummy/tests/helpers/build-container';
import MyUtil from 'my-app/utils/my-util';
 
var User;
 
module('My Util', {
  setup: function() {
    MyUtil.reopen({
      container: buildContainer()
    });
  }
});

Readme

Keywords

Package Sidebar

Install

npm i ember-test-container

Weekly Downloads

3

Version

0.1.0

License

MIT

Last publish

Collaborators

  • bcardarella