Skip to content

Commit

Permalink
Fix lint and test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amireh committed May 20, 2016
1 parent 26e0315 commit 003bed2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ packages/*/dist
packages/megadoc/ui
packages/interface-builder
packages/megadoc-plugin-react
packages/megadoc-plugin-skeleton
packages/megadoc-plugin-markdown/ui/components/ClassBrowser.js

doc/compiled
Expand Down
4 changes: 3 additions & 1 deletion lib/__tests__/HTMLSerializer__LinkResolver.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ describe('HTMLSerializer::LinkResolver', function() {
documents: [
b.document({
id: 'Contact',
href: '/the-zoo/contact',
meta: {
href: '/the-zoo/contact',
},
title: 'Contact Us - The Zoo',
filePath: '/doc/zoo/contact.md'
})
Expand Down
5 changes: 4 additions & 1 deletion packages/megadoc-corpus/lib/__tests__/Corpus.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ describe('Corpus', function() {
assert.equal(nodeType, 'Document');
});

it('does not call a visitor that was registered for a child type', function() {
// we can't really test this anymore ever since we removed "parentNode" from
// the definition of Node; there's no way to instantiate Nodes anymore which
// _kind-of_ conforms to this spec.
it.skip('does not call a visitor that was registered for a child type', function() {
var called = false;

subject.visit({
Expand Down
2 changes: 1 addition & 1 deletion packages/megadoc-plugin-dot/lib/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function(compiler, config) {
text: sharedDirectives + code,
injectors: [ injector ],
format: 'html',
contextNode: params.contextNode
contextNode: params && params.contextNode
});

var svg = nomnoml.renderSvg(src);
Expand Down
1 change: 0 additions & 1 deletion packages/megadoc-plugin-js/ui/components/Module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const React = require('react');
const ModuleBody = require('./ModuleBody');
const HasTitle = require('mixins/HasTitle');
const ModuleHeader = require('./ModuleHeader');
const Outlet = require('components/Outlet');
Expand Down
6 changes: 0 additions & 6 deletions packages/megadoc-plugin-js/ui/components/ModuleBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ function isStaticProperty(scope) {
].indexOf(scope) === -1 || scope ;
}

function hasDetailedDescription(node) {
return node.properties.description && (
node.properties.description.replace(/(^\<p\>|\<\/p\>\n?$)/g, '') !== node.summary
);
}

function getMixedInTargets(node, namespaceNode) {
const { uid } = node;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe("[Integration] megadoc-plugin-yard-api", function() {

// it linkifies stuff in @example_response and @example_request
suite.assertFileWasRendered('test/admin_account_configs.html', {
html: '"response": "<a href="author_users.html#test-author_users-user_response" class="mega-link--internal">API::UserResponse</a>'
html: '"response": "<a class="mega-link--internal" href="author_users.html#test-author_users-user_response">API::UserResponse</a>'
});

// it renders the objects
Expand Down

0 comments on commit 003bed2

Please sign in to comment.