cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Blotsky (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-13945) `npm test` still relevant?
Date Fri, 02 Mar 2018 19:08:00 GMT

    [ https://issues.apache.org/jira/browse/CB-13945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16383999#comment-16383999
] 

Dmitry Blotsky commented on CB-13945:
-------------------------------------

Yes. This was part of the previous docs generator, written by [~akurdyumov]. Some of the files
are still helpful, and some have been replaced. We can sit down and look through these, to
see what to keep.

> `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)
>            Priority: Major
>
> 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


Mime
View raw message