starlight
starlight copied to clipboard
Unit tests
We do have a few unit tests already but they do not actually cover full engine
Do you want unit tests in a separate mod or in comments?
Personally i tend to make them in comments (give every public fn a # example section) so they get deleted/changed with the function
TBH I don't know. Some of the code might need much more tests that could fit in the doc comment i.e object methods that might have lots and lost of different behaviours
FYI, working on a CONTRIBUTING.md to explain how we want tests and such
Question: if we add docs to public API and such: sagudev once made me a github action which publishes the rustdoc at github. maybe that would be nice for starlight also? see: https://github.com/HiRoFa/quickjs_es_runtime/blob/master/.github/workflows/rust.yml#L82
docs here
That way you can have the latest docs available online without publishing to crates.io
Github action docs look nice! There's also docs/
directory in the root of the repository, shall we consider moving docs from there to Rust generated docs?
shall we consider moving docs from there to Rust generated docs?
agreed!
I think we could also make a public website using some static site generator, for example Docusaurus. And the docs under the root directory can be there. Also it could include a reference link to the cargo generated docs. At last, the website and the reference docs can all be deployed on GitHub pages using actions.
@jameslahm there's already one: https://starlight-js.github.io/ but I haven't updated it for a while. I want to believe that soon I'll update it and write a few blog posts about internals,GC etc
@playXE I see it before. I mean we could also consider some other more functional static site generator, including support search, table of content, auto translation to multiple language etc.