create-readme
Version:
Automatically creates README.md based on package.json and other existing files.
55 lines (51 loc) • 1.3 kB
JavaScript
// Generated by CoffeeScript 2.3.2
(function() {
var InstallParser;
InstallParser = require('../components/install.coffee');
describe("An InstallParser", function() {
var pkg;
pkg = null;
beforeEach(function() {
pkg = require('../../package.json');
return pkg.git = {
user: "dbartholomae",
repo: "readme-creator",
branch: "master"
};
});
it("returns default options when not configured differently", function() {
var installParser;
installParser = new InstallParser();
return expect(installParser.run(pkg)).to.eventually.deep.equal({
modules: {
names: [
{
name: 'CommonJS'
}
]
},
unpkg: false
});
});
return it("uses different settings if given", function() {
var installParser;
installParser = new InstallParser({
modules: ['CommonJS', 'RequireJS'],
unpkg: true
});
return expect(installParser.run(pkg)).to.eventually.deep.equal({
modules: {
names: [
{
name: 'CommonJS'
},
{
name: 'RequireJS'
}
]
},
unpkg: true
});
});
});
}).call(this);