Created
October 2, 2015 03:14
-
-
Save vikikamath/035936b11b4b6078a74b to your computer and use it in GitHub Desktop.
RequireJS-Node-Mocha-Chai Scaffolding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function(require){ | |
return "success"; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirejs-node", | |
"version": "0.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "mocha --recursive" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"chai": "^3.3.0", | |
"mocha": "^2.3.3" | |
}, | |
"dependencies": { | |
"requirejs": "^2.1.20" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var requirejs = require('requirejs'); | |
var path = require('path'); | |
requirejs.config({ | |
baseUrl: path.resolve('src') | |
}); | |
var expect = require('chai').expect; | |
describe('Load Sut', function(){ | |
it('should load sut', function(){ | |
requirejs(['index'], function(sut){ | |
expect(sut).to.equal('success'); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment