create-readme
Version:
Automatically creates README.md based on package.json and other existing files.
57 lines (53 loc) • 1.61 kB
JavaScript
// Generated by CoffeeScript 2.3.2
(function() {
var DependencyParser;
DependencyParser = require('../components/dependencies.coffee');
describe("A DependencyParser", function() {
var pkg;
pkg = null;
beforeEach(function() {
pkg = require('../../package.json');
return pkg.git = {
user: "dbartholomae",
repo: "readme-creator",
branch: "master"
};
});
it("should parse dependencies correctly", function() {
var dependencyParser;
pkg.dependencies = {
'bluebird': '3.1.1'
};
pkg.devDependencies = {};
dependencyParser = new DependencyParser();
return expect(dependencyParser.run(pkg)).to.eventually.deep.equal({
dep: [
{
name: 'bluebird',
url: 'https://github.com/petkaantonov/bluebird',
desc: 'Full featured Promises/A+ implementation with exceptionally good performance'
}
],
dev: []
});
});
return it("should parse devDependencies correctly", function() {
var dependencyParser;
pkg.dependencies = {};
pkg.devDependencies = {
'npm-build-tools': '*'
};
dependencyParser = new DependencyParser();
return expect(dependencyParser.run(pkg)).to.eventually.deep.equal({
dep: [],
dev: [
{
name: 'npm-build-tools',
url: 'https://github.com/Deathspike/npm-build-tools',
desc: 'Cross-platform command-line tools to help use npm as a build tool.'
}
]
});
});
});
}).call(this);