Testing against multiple versions of jquery using jasmine and grunt

I've written jasmine tests for a jquery plugin which I would like to automatically test against each version of jquery I claim to support. I've set up the tests to run for a single version of jquery using grunt-jasmine-runner, but how can I run the jasmine task several times, once for each version of jquery? And is it possible with qunit too?

First I'd recommend you update to Grunt v0.4 and switch to the (much improved) grunt-contrib-jasmine module.

Once you've done that it should be trivial to configure multiple Jasmine targets that test your code using different versions of jQuery. You can reuse options blocks across all your test targets to reduce duplication. Something like (in Gruntfile.js):

grunt.initConfig({
    jasmine: {
        // Run the same tests everywhere.
        options: {
            specs: 'path/to/your/specs.js'
        },

        // Test against jQuery 1.6.x
        jQuery_16: {
            src: 'path/to/your/plugin.js',
            options: {
                vendor: 'path/to/jquery-1.6.2.js'
            }
        }
    }
});

You can duplicate the jQuery_## block as many times as you need, changing the vendor path each time to point to a different version of jQuery. Note that you must repeat the 'src' definition each time.