# Need help. Cannot find why tests are failing

**URL:** <https://discourse.processing.org/t/need-help-cannot-find-why-tests-are-failing/9528>\
**Category:** Development\
**Created:** [March 22, 2019, 11:30am UTC](https://discourse.processing.org/t/need-help-cannot-find-why-tests-are-failing/9528 "2019-03-22T11:30:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhinavsagar](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@abhinavsagar](https://discourse.processing.org/u/abhinavsagar)\
**Post date:** [March 22, 2019, 11:30am UTC](https://discourse.processing.org/t/need-help-cannot-find-why-tests-are-failing/9528/1 "2019-03-22T11:30:10Z")

</div>

Can someone tell me why my tests are are failing at this PR [https://github.com/processing/p5.js/pull/3633](https://github.com/processing/p5.js/pull/3633)

---

<div class="post-metadata">

**Author:** ![cansik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cansik/32/8815_2.png) [@cansik](https://discourse.processing.org/u/cansik)\
**Post date:** [March 22, 2019, 11:35am UTC](https://discourse.processing.org/t/need-help-cannot-find-why-tests-are-failing/9528/2 "2019-03-22T11:35:46Z")

</div>

Just take a look at the travis build:

[https://travis-ci.org/processing/p5.js/jobs/509870533#L543](https://travis-ci.org/processing/p5.js/jobs/509870533#L543)

You code seems to be syntactically wrong.

```auto
/home/travis/build/processing/p5.js/utils/sample-linter.js:96:7: Parsing error: Unexpected keyword 'var' [Error]

```

---

<div class="post-metadata">

**Author:** ![abhinavsagar](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@abhinavsagar](https://discourse.processing.org/u/abhinavsagar)\
**Post date:** [March 22, 2019, 2:59pm UTC](https://discourse.processing.org/t/need-help-cannot-find-why-tests-are-failing/9528/3 "2019-03-22T14:59:52Z")

</div>

@cansik I am still not getting this. In this case`preprocess` is a function. It should be initialized with var so what is the error in it?

---

<div class="post-metadata">

**Author:** ![cansik](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cansik/32/8815_2.png) [@cansik](https://discourse.processing.org/u/cansik)\
**Post date:** [March 22, 2019, 3:24pm UTC](https://discourse.processing.org/t/need-help-cannot-find-why-tests-are-failing/9528/4 "2019-03-22T15:24:20Z")

</div>

First of all it makes sense to mention the issue you are going to close with this pullrequest. Because I don’t know what you are trying to achieve. Changing the linter form ES5 to ES6 does only work if the toolchain is also changed to ES6.

And your code has semantic errors, as I already told you. `processors` is an dictionary, but you are trying to add var to it, which is just not possible. It should look more like `preprocess : text => { ... }`.

```auto
processors: {
'.js': {
  supportsAutofix: true,
  var preprocess = text => {
  	this.lines = splitLines(text);

```

But as already mentioned, please show us the issue which you try to solve with the pullrequest. And then try to build it yourself locally (at least validate it).
