1.0.0 • Published 4 years ago

ava-to-json v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

ava2json

tests

ava2json~AvaTest

Properties

NameTypeDescription
titleStringThe AVA test title wrapped inside of the test function
descriptionStringThe feature description (if any) added above the test as a JSDoc comment
codeStringThe code found wrapped in the test function.
flagStringEither 'skip', 'only', 'todo' or null for none;

ava2json~parseAva(avaString, options)

ParamTypeDefaultDescription
avaStringStringThe source of the AVA test file
optionsObject
options.unIndentNumber2Positive integer in which the code will be un-indented
options.testNameStringtestThe name of the test function to look-up into the code

Returns: Array.<AvaTest> - The tests found in the source code

Parses given AVA test source code

ava2json~parseFile(file, options)

ParamTypeDescription
fileStringPath to the AVA file
optionsObjectSame options as in parseAva

Parses given AVA file

ava2json~parseFileSync(file, options)

ParamTypeDescription
fileStringPath to the AVA file
optionsObjectSame options as in parseAva

Parses given AVA file synchronously

A module for converting AVA tests syntax into JSON


License

MIT

© 2020-present Martin Rafael Gonzalez tin@devtin.io