Giter VIP home page Giter VIP logo

qunit_for_rails's Issues

Readme

Nitpick here....

In your readme, it should read:

script/plugin install git://github.com/mkrisher/qunit_for_rails.git

instead of the private repo address:

script/plugin install [email protected]:mkrisher/qunit_for_rails.git

Not able to execute two tests at once

Greetings,

My situation is the following: In my tests file, I've written down two tests that have both to do with clickable events. Both of them run successfully isolated, but when i try to run them both at once, the second click event always throws a very strange exception: "M.xhr is not a function".

I will write down a small draft example of what i'm trying to achieve:

var localtests = {
test_1 : function()
{
module("1");
test("function 1", function()
{
expect(1);
stop();
var button = $('a:first');
var handler = function(event, data){
setTimeout( function() {
equals(1, 1, "check 1");
start();
}, 2000);
};
button .bind("click", {}, handler).trigger('click').unbind("click", handler);
});
module("2");
test("2", function()
{
stop();
var another_button = $('a:last');

              var another_handler = function(event, data){
                setTimeout( function()
                { 
                 equals(2, 2, "check 2");  
                 start();
                }, 2000);
            };
    another_button .bind("click", {},another_handler).trigger('click').unbind("click", another_handler); // this line returns the exception

});  

}
};

$().extend(tests, localtests);

Well now, it may be that my problem doesn't have anything to do with it being about clickable events or not, maybe it might just be a badly written test, the problem being then, that the available documentation couldn't help me write a better test, my request being, in case this is the case where talking about, could you please update the documentation?

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.