Code Monkey home page Code Monkey logo

ember-cli-pretender's Introduction

ember-cli-pretender

Simple wrapper for pretender.js, this project removes the need for the developer to know which files need to be imported.

Usage

ember install ember-cli-pretender

You can then import Pretender in your tests:

import Pretender from 'pretender';

see: pretenderjs/pretender for pretender docs

Configuration

By default pretender.enabled will be set to app.tests. This means that pretender will only be available as an import when your app includes your test suite.

If you'd like to include Pretender into production builds as well, you can set pretender.enabled to true in your ember-cli-build.js or Brocfile.js:

var app = new EmberApp({
  pretender: {
    enabled: true
  }
});

Nested Addon Usage Caveat

To publish an addon that exports functionality driven by ember-cli-pretender, note that ember-cli-pretender must be listed in the dependencies for NPM and not the devDependencies.

When consuming an addon that consumes ember-cli-pretender, running the initializing generator by hand is required.

ember generate ../node_modules/the-addon/node_modules/ember-cli-pretender/blueprints/ember-cli-pretender

ember-cli-pretender's People

Contributors

alexlafroscia avatar bantic avatar cball avatar cromwellryan avatar jdjkelly avatar karelvuong avatar lcoq avatar mike-north avatar mmun avatar rwjblue avatar saygun avatar stefanpenner avatar tehviking avatar tim-evans avatar tricknotes avatar turbo87 avatar vitch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.