flextag-test

0.1.0 • Public • Published

flextag-test

NPM version

Test suite for flextag tools

Cross Platform

Code for managing the test suite is in JavaScript, but the actual tests are all converted to JSON for easy access from other languages.

For example, syntax.json starts:

[
  {
    "feature": "intro",
    "input": "Hello, World!",
    "output": "Hello, World",
    "comment": "Statement-ending punctuation is removed. A bit sad for this example."
  },
  {
    "feature": "intro",
    "input": "Hi. Bye.",
    "output": [
      "Hi",
      "Bye"
    ],
    "comment": "When that punctuation ends a statement, addition text is considered a new statement."
  }
...

Via NPM

With node/npm, you can just

const { syntax } = require('flextag-test')
console.log(syntax[0])
/* =>
 feature: 'intro',
  input: 'Hello, World!',
  output: 'Hello, World',
  comment:
   'Statement-ending punctuation is removed. A bit sad for this example.' }
*/

Types of tests

Right now we have:

  • Syntax tests with tc.input and tc.output, where output is a representation of the syntax tree.

Readme

Keywords

Package Sidebar

Install

npm i flextag-test

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

15.3 kB

Total Files

6

Last publish

Collaborators

  • sandhawke