Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Kataw test runner

This files and folders contains the source files for the Kataw's own test suite

Features

  • Snapshots

  • Performance

API

The Kataw test runner API is very simple and takes a few arguments. If no arguments, the tests will run as normal and report if any errors.

ts-node test/run.ts

Options

The second argument allows you to specify various options:

Option Description
-f "path" Only test this file / dir
-u parser Regenerate computed test case blocks for the parser
-u printer Regenerate computed test case blocks for the printer
-u all Regenerate computed test case blocks for both parser and printer
-g Auto-update tests with the results
-G Same as -g except it skips existing files

Writing a new test

Use one of the existing .md files, and insert the code after Input, and update the snapshort

Writing autogenerated files

Use one of the existing autogen.md files. Insert the code after ### Cases like this

>
> false
>

Then insert the tests after template

### Templates

#### in array

[ # ]

In this example the autogenerated folder name will be in array and the test case [ false ]