Skip to content

Commit

Permalink
Fix navigation test name
Browse files Browse the repository at this point in the history
  • Loading branch information
HTMLGuyLLC committed Jul 17, 2019
1 parent 3a137da commit 2ea9819
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/jpack.bundled.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jpack.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion es/navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ export const navigation = {
//get the canonical link
var links = doc.querySelectorAll('link[rel="canonical"]');
//get body classes
var body_classes = doc.body.classList;
var body_classes = doc.body.classList.toString();

//default to the incoming HTML
var new_html = html;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@htmlguyllc/jpack",
"version": "9.0.14",
"version": "9.0.15",
"description": "Core Javascript Library of Everyday Objects, Events, and Utilities",
"keywords": [
"javascript",
Expand Down
4 changes: 2 additions & 2 deletions test/_jpack.bundled.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions test/es-navigation.js → test/es-navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ describe('navigation', function() {
await page.evaluate(function () {
var nav = jpack.navigation;

var parsed = nav._parseHTML("<head><title>Hey</title><meta name='current_route' content='hi'><link rel='canonical' content='/this-url'></head><body class='my-body'><div><span>text</span></div></body>", "span");
var parsed = nav._parseHTML("<head><title>Hey</title><meta name='current_route' content='hi'><link rel='canonical' content='/this-url'></head><body class='my-body your-body'><div><span>text</span></div></body>", "span");

if( parsed.title !== 'Hey' ) throw `Parsed title is incorrect ${parsed.title}`;
if( parsed.route !== 'hi' ) throw `Parsed route is incorrect ${parsed.route}`;
if( parsed.metas.length !== 1 ) throw `Parsed metas is incorrect ${parsed.metas} (1)`;
if( parsed.metas[0].content !== 'hi' ) throw `Parsed metas is incorrect ${parsed.metas} (2)`;
if( parsed.links ) throw `Found links when there were none`;
if( parsed.body_classes !== 'my-body' ) throw `Parsed body_classes is incorrect ${parsed.body_classes}`;
if( parsed.links.length !== 1 ) throw `Parsed links is incorrect ${parsed.links}`;
if( parsed.body_classes !== 'my-body your-body' ) throw `Parsed body_classes is incorrect ${parsed.body_classes}`;
if( parsed.html !== '<span>text</span>' ) throw `Parsed HTML is incorrect ${parse.html}`;

});
Expand Down

0 comments on commit 2ea9819

Please sign in to comment.