Socket
Socket
Sign inDemoInstall

ember-test-helpers

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-test-helpers

Helpers for testing Ember.js applications


Version published
Weekly downloads
6.5K
increased by17%
Maintainers
6
Weekly downloads
 
Created
Source

ember-test-helpers Build Status

A test-framework-agnostic set of helpers for testing Ember.js applications.

Usage

This library is best used by way of a test-framework-specific wrapper, such as ember-qunit or ember-mocha.

Test Helpers

The exports of this library are intended to be utility functions that can be used to bring the standard Ember testing experience to any testing framework.

A quick summary of the exports from the ember-test-helpers module:

  • setResolver - This function is used to allow the other functions build a valid container/registry that is able to look objects up from your application (just as a running Ember application would).
  • setContext - Invoked by the host testing framework to set the current testing context (generally the this within a running test).
  • getContext - Used to retrieve the current testing context.
  • unsetContext - Used to ensure that all handles on the testing context are released (allowing GC).
  • setupContext - Sets up a given testing context with owner, get, set, etc properties.
  • teardownContext - Cleans up any objects created as part of the owner created in setupContext.
  • setupRenderingContext - Sets up the provided context with the ability to render template snippets by adding render, clearRender, etc.
  • teardownRenderingContext - Cleans up any work done in a rendering test.
  • settled - Returns a promise which will resolve when all async from AJAX, test waiters, and scheduled timers have completed.

Collaborating

Installation

  • git clone <repository-url> this repository
  • cd ember-test-helpers
  • npm install

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

Attribution

Much of ember-test-helpers was extracted from the original ember-qunit, which was written by Stefan Penner, Robert Jackson, and Ryan Florence.

Copyright 2015 Switchfly and contributors.

Dual-licensed under the Apache License, Version 2.0 and the MIT License.

Keywords

FAQs

Package last updated on 17 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc