UNPKG

create-readme

Version:

Automatically creates README.md based on package.json and other existing files.

38 lines (34 loc) 1.16 kB
// Generated by CoffeeScript 2.3.2 (function() { var DocsParser; DocsParser = require('../components/docs.coffee'); describe("A DocsParser", function() { var pkg; pkg = null; beforeEach(function() { pkg = require('../../package.json'); return pkg.git = { user: "dbartholomae", repo: "readme-creator", branch: "master" }; }); it("returns a GitHub Pages url if the doc directory is set correctly", function() { var docsParser; docsParser = new DocsParser(); return expect(docsParser.run(pkg)).to.eventually.deep.equal('https://dbartholomae.github.io/readme-creator/'); }); it("returns null if the doc directory isn't set", function() { var docsParser; pkg.directories.doc = null; docsParser = new DocsParser(); return expect(docsParser.run(pkg)).to.eventually.deep.equal(null); }); return it("returns null if it isn't a git repository", function() { var docsParser; pkg.git = null; docsParser = new DocsParser(); return expect(docsParser.run(pkg)).to.eventually.deep.equal(null); }); }); }).call(this);