Skip to content

Instantly share code, notes, and snippets.

@ianstormtaylor
Last active August 29, 2015 14:02
Show Gist options
  • Save ianstormtaylor/8620c70da1fffaa2de6d to your computer and use it in GitHub Desktop.
Save ianstormtaylor/8620c70da1fffaa2de6d to your computer and use it in GitHub Desktop.
This is the normal way that Duo tests would be created for modules. It's testing the logic inside the module itself, but it's not testing the actual "built" file.
{
"name": "to-slug-case",
"dependencies": {
"ianstormtaylor/to-no-case": "1.x"
},
"development": {
"component/assert": "0.x"
}
}
var clean = require('ianstormtaylor/to-no-case');
module.exports = function(input){
return clean(input).replace(/ /g, '-');
}
build-test.js: index.js test.js
duo test.js > build-test.js
test: build-test.js
mocha build-test.js
var slug = require('..');
var assert = require('component/assert');
// Tests here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment