You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jan Piotrowski (Sujan) (JIRA)" <ji...@apache.org> on 2018/03/02 14:22:00 UTC
[jira] [Created] (CB-13945) `npm test` still relevant?
Jan Piotrowski (Sujan) created CB-13945:
-------------------------------------------
Summary: `npm test` still relevant?
Key: CB-13945
URL: https://issues.apache.org/jira/browse/CB-13945
Project: Apache Cordova
Issue Type: Task
Components: cordova-docs
Reporter: Jan Piotrowski (Sujan)
There are some tests in cordova-docs which can be run with `npm test`, described here: https://github.com/apache/cordova-docs/blob/master/doc/testing-the-website.md
{code}
C:\Projects\Cordova\cordova-docs (janpio-random_docs_stuff -> origin) (cordova-website@0.0.1)
λ npm test
> cordova-website@0.0.1 test C:\Projects\Cordova\cordova-docs
> npm run eslint && npm run mocha
> cordova-website@0.0.1 eslint C:\Projects\Cordova\cordova-docs
> eslint tools/lib tools/spec
> cordova-website@0.0.1 mocha C:\Projects\Cordova\cordova-docs
> mocha --recursive tools/spec
(node:11372) [DEP0006] DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead.
AddTitle
√ should set the title
√ should skip files with no source title
√ should skip files with no target title
Prettify
√ should find some code blocks
√ should add the prettyprint class to each code block
TableOfContents
√ should find the table of content values
√ should find all <h1> elements
√ should find all <h2> elements
√ should ignore whitespace in the target name
√ should create a HTML select element
√ should skip files with no source title
√ should skip files with no target title
UpdateIndex
√ should skip all files but index.md.html
√ should rename the title
√ should rename the file
UpdateKeywordIndex
√ should skip all files but _index.html
√ should rename the title
√ should rename the h1 (66ms)
√ should remove the <hr/>
√ should update references from index.md.html to index.html
YamlFrontMatter
√ should skip files with no YAML Front Matter
√ should parse files with YAML Front Matter
FileHelpers
- should have a default input directory that exists
22 passing (901ms)
1 pending
{code}
If you follow the trail, this seems to run the tests in `tools/spec/cordova`. Looking into the actual spec files, it seems to test functionality in these files:
- /lib/cordova/post/addtitle
- /lib/cordova/post/prettify
- /lib/cordova/post/tableofcontents
- /lib/cordova/post/updateindex
- /lib/cordova/post/updatekeywordindex
- /lib/cordova/pre/yamlfrontmatter
Is the code being tested here actually still relevant for the current state of the docs?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org