Skip to content

Instantly share code, notes, and snippets.

@vikikamath
Created October 2, 2015 03:14
Show Gist options
  • Save vikikamath/035936b11b4b6078a74b to your computer and use it in GitHub Desktop.
Save vikikamath/035936b11b4b6078a74b to your computer and use it in GitHub Desktop.
RequireJS-Node-Mocha-Chai Scaffolding
define(function(require){
return "success";
});
{
"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"
}
}
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