GithubHelp home page GithubHelp logo

nvdnkpr / intern Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theintern/intern

0.0 2.0 0.0 323 KB

A next-generation code testing stack for JavaScript.

Home Page: http://theintern.io

License: Other

intern's Introduction

“Just make the Intern do the testing” Build Status

Intern is a complete test stack for JavaScript designed to help you write and run consistent, high-quality test cases for your JavaScript libraries and applications. It can be used to test any JavaScript code. Its functional testing capabilities can even be used to test non-JavaScript Web sites and apps, if you really want.

Features

  • 100% AMD, 100% Promises/A-based API
  • Instant one-off test execution in the browser or Node.js
  • Full statement, branch, function, and line code coverage reporting with Istanbul
  • Functional testing using the standard WebDriver API with a custom fluid, promises-wrapped interface based on WD.js
  • Integration with Sauce Labs for super simple continuous integration
  • Tested with Travis CI
  • Extensible interfaces (comes with TDD, BDD, and objects)
  • Extensible reporters (comes with basic console, WebDriver, and lcov reporters; tap planned)
  • Extensible assertions using the Chai Assertion Library (or any other assertion library that throws errors)

Comparison

Feature Intern QUnit Mocha Jasmine BusterJS Karma
Code coverage analysis Yes No Yes No Extension Yes
True1 browser events Yes No No No No No
Native AMD support Yes No No No Extension Extension
Stand-alone2 browser support Yes Yes Build required Build required Experimental No
Node.js support Yes No3 Yes Yes Yes Yes
Any4 assertion library Yes No Yes No Yes N/A
Default test interface TDD, BDD, object TDD TDD, BDD, object BDD TDD, BDD N/A
Extensible test interfaces Yes No Yes No Yes N/A
Extensible reporters Yes No Yes No Yes N/A
Asynchronous support Promises Globals Callbacks Polling Callbacks, Promises Callbacks
Selenium support Yes No No No No No
Built-in CI support Yes No No No Yes Yes
Built-in Sauce Labs integration Yes No No No No No
Built-in Travis CI integration Yes No No No No Yes
Grunt support Yes 3rd party 3rd party 3rd party 3rd party 3rd party

1: True events are not generated by JavaScript within the sandbox, so are able to accurately emulate how a user actually interacts with the application. Synthetic events generated by other test frameworks are limited by browser security restrictions.

2: Stand-alone means that unit tests can be executed in a browser by navigating to a URL without needing any special HTTP server or proxy for support.

3: Some older versions of QUnit can be used in conjunction with a 3rd party module to run on Node.js, but newer versions do not support Node.js and will break even with the use of 3rd party modules.

4: If it throws an error on failure, it works with Intern.

Quick start

  1. Clone this repository as a sibling directory of the package (or packages) that you want to test.

    cd /my/project/root
    git clone --recursive https://github.com/theintern/intern.git
    
  2. Use npm to install dependencies.

    cd intern
    npm install --production
    
  3. Create a copy of the example configuration file in your package’s test directory and edit appropriately. See the configuration documentation for a list of all available options.

    cp tests/example.intern.js ../package/tests/intern.js
    
  4. Verify your configuration works by running the Node.js client and seeing that no errors are output.

    node client.js config=package/tests/intern
    
  5. Start writing tests! See the writing tests documentation to learn how.

More information

Do you hate kittens and love old IE?

If you need to support IE 6–8, there is also a version of Intern for legacy browsers.

License

Intern is available under the terms of the New BSD License. All code, with the exception of portions of the assert.js library and tests in the geezer branch, is developed under the terms of the Dojo Foundation CLA.

© 2012–2013 Colin Snover http://zetafleet.com
© 2013 SitePen, Inc. http://sitepen.com
All rights reserved.

intern's People

Contributors

csnover avatar bitpshr avatar bryanforbes avatar neonstalwart avatar vladikoff avatar ginatrapani avatar kfranqueiro avatar milesj avatar

Watchers

Navid Nikpour 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.