Skip to content

Cannot set property 'hrtime' of undefined #59

@gautaz

Description

@gautaz

Hello,

After migrating from lolex 1.4.0 to 1.5.0, my tests fails with this exception:

     TypeError: Cannot set property 'hrtime' of undefined
      at uninstall (node_modules/lolex/src/lolex-src.js:360:39)
      at Object.clock.uninstall (node_modules/lolex/src/lolex-src.js:629:13)
      at bus.close.then.then (test/scheduling/testScheduler.js:64:57)

I'm using nodejs 6.2.0.

My tests use lolex this way:

Setup:

clock = lolex.install(context)

Tear down:

clock.uninstall()

lolex-src.js 1.5.0 seems to assume that the context object has a key named process.

Any idea regarding this ? Does this mean that compatibility was broken somehow ?

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