Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ololog/reporter: TypeError: (intermediate value).clean.at is not a function #26

Open
unlight opened this issue Jan 19, 2021 · 1 comment

Comments

@unlight
Copy link

unlight commented Jan 19, 2021

TypeError: (intermediate value).clean.at is not a function

How to repeat:

git clone https://github.com/unlight/node-package-starter.git
cd node-package-starter
npm i
npm i -D  ololog
# change src/index.spec.ts, change line with 'Hello world' to
# expect(library.hello()).toEqual('Hello world!!!');
node -r ts-node/register/transpile-only node_modules/mocha/bin/_mocha --reporter ololog/reporter  src/**/*.spec.ts

Result:

            const location = new StackTracey ().clean.at (2)
                                                      ^

TypeError: (intermediate value).clean.at is not a function
    at Function.ololog.impl.render (D:\Dev\node-package-starter\node_modules\ololog\reporter.js:62:55)
    at Function.modifiedFunctions.<computed> (D:\Dev\node-package-starter\node_modules\pipez\pipez.js:48:45)
    at Function.modifiedFunctions.<computed> (D:\Dev\node-package-starter\node_modules\pipez\pipez.js:48:45)
    at Function.modifiedFunctions.<computed> (D:\Dev\node-package-starter\node_modules\pipez\pipez.js:48:45)
    at D:\Dev\node-package-starter\node_modules\pipez\pipez.js:23:73
    at Array.reduce (<anonymous>)
    at Function.Object.assign.configure (D:\Dev\node-package-starter\node_modules\pipez\pipez.js:23:39)
    at process.<anonymous> (D:\Dev\node-package-starter\node_modules\ololog\reporter.js:10:48)
    at process.emit (events.js:327:22)
    at process.EventEmitter.emit (domain.js:467:12)
    at process.emit (D:\Dev\node-package-starter\node_modules\source-map-support\source-map-support.js:495:21)
    at process._fatalException (internal/process/execution.js:163:25)

Expected:

Formatted exception
https://github.com/xpl/ololog#using-with-mocha

Env:

  • Windows 10
  • Node v14.15.4
  • ololog@1.1.164
  • mocha@8.2.1
@EnterTheNameHere
Copy link

Encountered this one too.

Seems changing the line

const location = new StackTracey ().clean.at (2)

to

const location = new StackTracey ().clean ().at (2)

might be a solution, since clear is a method.

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

No branches or pull requests

2 participants