abao icon indicating copy to clipboard operation
abao copied to clipboard

"before all" hook: TypeError: callback is not a function

Open fabstao opened this issue 4 years ago • 0 comments

Hi!

Can't run abao simple test, I get the following errors (truncated):

1) "before all" hook
  2) "after all" hook

  0 passing (46ms)
  2 failing

  1)  "before all" hook:
     TypeError: callback is not a function
      at /usr/local/lib/node_modules/abao/lib/hooks.coffee:76:16
      at /usr/local/lib/node_modules/abao/node_modules/async/dist/async.js:3888:9
      at /usr/local/lib/node_modules/abao/node_modules/async/dist/async.js:473:16
      at replenish (/usr/local/lib/node_modules/abao/node_modules/async/dist/async.js:1006:25)
      at /usr/local/lib/node_modules/abao/node_modules/async/dist/async.js:1016:9
      at eachOfLimit (/usr/local/lib/node_modules/abao/node_modules/async/dist/async.js:1041:24)
...

2)  "after all" hook:
     TypeError: callback is not a function
      at /usr/local/lib/node_modules/abao/lib/hooks.coffee:82:16
      at /usr/local/lib/node_modules/abao/node_modules/async/dist/async.js:3888:9
...

Environment:

>$ node --version
v15.5.1
>$
>$ abao --version
0.5.0

RAML:

#%RAML 0.8
title: Fruits API
version: v1
baseUri: http://localhost:8080
/fruits:
  get:
    description: Get a list of fruits
    responses:
      200:
        body:
          application/json:
            schema: |
              [
                description: 'string',
                fruit: 'string'
              ]
            example: |
              {"description":"Winter fruit","name":"Apple"}

This is the output I get from the API to test:

>$ curl localhost:8080/fruits
[{"description":"Winter fruit","name":"Apple"},{"description":"Tropical fruit","name":"Pineapple"}]>

Please your help

Happy new year!

fabstao avatar Jan 06 '21 16:01 fabstao