# Testing hooks locally / in CI

**URL:** <https://community.auth0.com/t/testing-hooks-locally-in-ci/8162>\
**Category:** Get Help\
**Tags:** testing, hooks\
**Created:** [September 12, 2017, 12:20pm UTC](https://community.auth0.com/t/testing-hooks-locally-in-ci/8162 "2017-09-12T12:20:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob.wang](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jacob.wang](https://community.auth0.com/u/jacob.wang)\
**Post date:** [September 12, 2017, 12:20pm UTC](https://community.auth0.com/t/testing-hooks-locally-in-ci/8162/1 "2017-09-12T12:20:10Z")

</div>

I want to test my hooks in CI, but I can’t simply run my script using `wt-cli serve` because it needs to be compiled by the hooks compiler, which I don’t have access to.

For example, if I run the following `hook.js` using `wt-cli serve hook.js --hostname localhost --port 1234`

```
module.exports = function(client, scope, audience, context, cb) {
    cb(null, {
      result: "good"
    });
};

```

I get an error response:

```
{
	"code": 500,
	"error": "Script generated an unhandled synchronous exception.",
	"details": "TypeError: cb is not a function",
	"name": "TypeError",
	"message": "cb is not a function"
}

```

I’m assuming because `hooks.js` actually needs to be compiled by auth0’s hooks compiler. Are there any instructions regarding running compilers locally to compile hooks and then serve them?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/testing-hooks-locally-in-ci/8162/2 "2018-03-02T05:56:27Z")

</div>


