Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Mocha 8.2.1 started causing an error for json-file-reporter #47

Open
NazarYermolenko opened this issue Nov 13, 2020 · 3 comments
Open

Comments

@NazarYermolenko
Copy link

The following error message started appearing after updating Mocha from 8.1.3 to 8.2.1

/home/newfire/Desktop/work/qa-ui/node_modules/@mochajs/json-file-reporter/src/index.js:75 fullTitle: test.fullTitle(), ^ TypeError: test.fullTitle is not a function at clean (/home/newfire/Desktop/work/qa-ui/node_modules/@mochajs/json-file-reporter/src/index.js:75:21) at Array.map (<anonymous>) at ParallelBufferedRunner.<anonymous> (/home/newfire/Desktop/work/qa-ui/node_modules/@mochajs/json-file-reporter/src/index.js:48:26) at Object.onceWrapper (events.js:420:28)

@munierujp
Copy link
Member

@NazarYermolenko Sorry for the delay in replying.
In my environment, that problem did not occur.
Could you show me the repository or source codes when the problem is reproducible?

@NazarYermolenko
Copy link
Author

NazarYermolenko commented Jan 18, 2021

The issue appears when all tests failing...

/home/newfire/Desktop/work/qa-api/node_modules/@mochajs/json-file-reporter/src/index.js:75
    fullTitle: test.fullTitle(),

TypeError: test.fullTitle is not a function
    at clean (/home/newfire/Desktop/work/qa-api/node_modules/@mochajs/json-file-reporter/src/index.js:75:21)
    at Array.map (<anonymous>)
    at ParallelBufferedRunner.<anonymous> (/home/newfire/Desktop/work/qa-api/node_modules/@mochajs/json-file-reporter/src/index.js:48:26)
    at Object.onceWrapper (events.js:420:28)
    at ParallelBufferedRunner.emit (events.js:326:22)
    at ParallelBufferedRunner.EventEmitter.emit (domain.js:483:12)
    at /home/newfire/Desktop/work/qa-api/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js:347:14
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

@NazarYermolenko
Copy link
Author

NazarYermolenko commented Jan 18, 2021

Or when the setup hook failing, I mean if the test has a before hook and the hook fails, the following error message appears
Then an instance of the test isn't creating and we got the error.
The resolution of the issue is throwing errors from setup hooks to the test, I mean it's necessary to initiate test instance before hooks execution.
@munierujp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants