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

inline not working with jest #1

Open
unional opened this issue Dec 31, 2017 · 1 comment
Open

inline not working with jest #1

unional opened this issue Dec 31, 2017 · 1 comment

Comments

@unional
Copy link

unional commented Dec 31, 2017

I try to use this for jest and it seems like the inline message is not working.

Here is the repro: https://github.com/unional/walllaby-typescript-powerassert/tree/jest

I notice the error output is different:

(jasmine)

​​​​​1 failing tests, 0 passing​​​​​
  
  ​​​​Sayings Greeter should greet​​​​ ​​​[33 ms]​​​​
    ​​​​
    ​​'Hello, John' == 'Hello, Jack'​​
    ​​   # src/greeter.unit.js:11​​
    ​​  ​​
    ​​  assert.equal(greeter.greet(), 'Hello, Jack')​​
    ​​               |       |                      ​​
    ​​               |       "Hello, John"          ​​
    ​​               Greeter{greeting:"John"}       ​​
    ​​  ​​
      at n.<anonymous> ​src/greeter.unit.ts:8:8​

(jest)

​​​​​1 failing tests, 0 passing​​​​​
  
  ​​​​Sayings Greeter should greet​​​​ ​​​[95 ms]​​​​
    ​​​​
    ​​assert.equal(received, expected) or assert(received) ​​
    ​​​​
    ​​Expected value to be (operator: ==):​​
    ​​  "Hello, Jack"​​
    ​​Received:​​
    ​​  "Hello, John"​​
    ​​​​
    ​​Message:​​
    ​​    # src/greeter.unit.js:11​​
    ​​  ​​
    ​​  assert.equal(greeter.greet(), 'Hello, Jack')​​
    ​​               |       |                      ​​
    ​​               |       "Hello, John"          ​​
    ​​               Greeter{greeting:"John"}       ​​
    ​​  ​​
    ​​  ​​
    ​​  assert.equal(greeter.greet(), 'Hello, Jack')​​
    ​​               |       |                      ​​
    ​​               |       "Hello, John"          ​​
    ​​               Greeter{greeting:"John"}       ​​
    ​​  ​​
    ​​    at new ​​
    ​​    at Function.onError (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/empower/index.js:62:25)​​
    ​​    at Decorator.Object.<anonymous>.Decorator._callFunc (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/empower-core/lib/decorator.js:114:29)​​
    ​​    at Decorator.Object.<anonymous>.Decorator.concreteAssert (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/empower-core/lib/decorator.js:103:17)​​
    ​​    at Function.decoratedAssert [as equal] (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/empower-core/lib/decorate.js:49:30)​​
    ​​    at Object.<anonymous> (/Users/hwong/.vscode/extensions/WallabyJs.wallaby-vscode-1.0.69/projects/765c4af845044fb3/instrumented/src/greeter.unit.js:11:28)​​
    ​​    at Object.e.length.arguments.(anonymous function) (/Users/hwong/.vscode/extensions/WallabyJs.wallaby-vscode-1.0.69/wallaby/runners/node/[email protected]/jasmine2Initializer.js:14:2006)​​
    ​​    at Object.asyncFn (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/jest-jasmine2/build/jasmine_async.js:124:345)​​
    ​​    at resolve (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/jest-jasmine2/build/queue_runner.js:51:12)​​
    ​​    at Promise (<anonymous>)​​
    ​​    at mapper (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/jest-jasmine2/build/queue_runner.js:40:274)​​
    ​​    at promise.then (/Users/hwong/github/wallabyjs/walllaby-typescript-powerassert/node_modules/jest-jasmine2/build/queue_runner.js:83:39)​​
    ​​    at <anonymous>​​
    ​​    at process._tickCallback (internal/process/next_tick.js:188:7) thrown​​

Maybe that contributes to it?

@ArtemGovorov
Copy link
Member

From my search it looks like power-assert may not actually support Jest: power-assert-js/power-assert#93, but I'll investigate more later.

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