Testing AMD Modules #65

geddski opened this Issue Aug 22, 2011 · 4 comments

4 participants


jasmine-node unfortunately doesn't come as a module (var jasmine = require('jasmine-node');) so the only option is to the use command line tool. And the command line tool blows up when when your specs are themselves AMD modules. I created a sample project to try to figure out how to test AMD modules with jasmine-node, if anyone wants to help out.



Had the same issue. I'm off to help with the amd-testing effort


check this link: http://blog.pixelingene.com/2011/12/simple-helper-method-for-async-testing-with-jasmine/ - didn't tried it yet but with a few tweaks it might work (need to replace require with a local requirejs instance)

also didn't tried it yet but this might actually work depending on the specs structure: https://github.com/jrburke/amdefine

I still think it would be better for the tool (jasmine-node) if it had the option to run as a module, that way it could be plugged into other tools as well and behavior could be changed as needed...


This is an option in jasmine2.0.

var jasmineNode = require('jasmine-node');
    "run": [Function],
    "defaults": {
        "autoTest": false,
        "captureExceptions": false,
        "coffee": false,
        "extensions": "js",
        "forceExit": false,
        "growl": false,
        "match": ".",
        "matchAll": false,
        "noColor": false,
        "noStackTrace": false,
        "specFolders": [],
        "verbose": false,
        "watchFolders": []
@tebriel tebriel closed this Mar 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment