Detalhes do pacote

textlint-ast-test

textlint40MITdepreciado2.0.2

See https://github.com/textlint/textlint/issues/455

Compliance tests for textlint's AST(Abstract Syntax Tree).

textlint, ast, testing, test

readme (leia-me)

textlint-ast-test

Compliance tests for textlint's AST(Abstract Syntax Tree).

It check compliance of AST at minimum.

If you have created Processor plugin for textlint, you can use it for testing the plugin.

Installation

npm install -D textlint-ast-test

Usage

test(textlintAST): void

if the AST is invalid, then throw Error

isTxtAST(textlintAST): boolean

if the AST is valid, then return true.

import {test, isTxtAST} from "textlint-ast-test";
import yourParse from "your-parser";
// recommenced: test much pattern test
const AST = yourParse("This is text");
test(AST);// if the AST is invalid, then throw Error

isTxtAST(AST);// true or false

Tests

npm test

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

changelog (log de mudanças)

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

2.0.2 (2018-01-12)

Note: Version bump only for package textlint-ast-test

2.0.1 (2017-12-25)

Note: Version bump only for package textlint-ast-test

2.0.0 (2017-12-18)

Note: Version bump only for package textlint-ast-test

2.0.0-next.0 (2017-12-15)

Bug Fixes