Skip to content

Losing context data #421

Closed
Closed
@pbalan

Description

@pbalan

Description/Steps to reproduce

I wrote a loopback component and all my tests are working with memory db.
However, when I change datasource to mongodb, I do not see the context data in operation hook.

  1. clone the repo below.
  2. npm test
  3. git checkout test-mongo
  4. npm test

Link to reproduction sandbox

https://github.com/pbalan/component-reproduce-error.git

Master Branch: runs with memory connector. TEST PASS
screen shot 2018-03-07 at 20 56 27

test-mongo Branch: runs with mongodb connector. TEST FAIL
screen shot 2018-03-07 at 20 57 06

Error thrown in source

Expected result

TEST PASS

Additional information

node -e 'console.log(process.platform, process.arch, process.versions.node)': darwin x64 8.9.4
npm ls --prod --depth 0 | grep loopback [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions