loghash-spec icon indicating copy to clipboard operation
loghash-spec copied to clipboard

Change unit tests formats

Open cmaneu opened this issue 9 years ago • 0 comments

Use a YAML file that, then generate JSON file. Sample:

- input: Hello #world
- output:
  - items:
    - hashtags:
      - world
    - identifiers
  - tokens:
      - type: string
        content: Hello
      - type: hashtag
        content: world

output:

{
    "input": "Hello"
  }, 
  {
    "output": [
      {
        "items": [
          {
            "hashtags": [
              "world"
            ]
          }, 
          "identifiers"
        ]
      }, 
      {
        "tokens": [
          {
            "content": "Hello", 
            "type": "string"
          }, 
          {
            "content": "world", 
            "type": "hashtag"
          }
        ]
      }
    ]
  }

cmaneu avatar Dec 07 '15 16:12 cmaneu