Skip to content

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

@fabstao

Description

@fabstao

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions