andywer/leakage

Can not 'passing'?

chiaweilee opened this issue · 2 comments

const { iterate } = require('leakage')

describe('leakage', () => {
  it('does not leak when doing something', () => {
    iterate(() => {
      console.log('-')
    })
  })
})
 1) does not leak when doing something


  0 passing (3s)
  1 failing

  1) leakage
       does not leak when doing something:
     MemoryLeakError: Heap grew on 6 subsequent garbage collections (180 of 180 iterations) by 25.6 kB.

  Iterations between GCs: 30

  Final GC details:
  [    2.4 kB] [+  60x] [-   0x] Array
  [   1.68 kB] [+  30x] [-   0x] TickObject
  [    -464 B] [+  63x] [-  63x] Native

      at testConstantHeapSize (node_modules/_leakage@0.4.0@leakage/lib/testConstantHeapSize.js:24:12)
      at iterate (node_modules/_leakage@0.4.0@leakage/lib/index.js:64:21)
      at Context.it (test/leakage.spec.js:5:5)

Hey @chiaweilee! Thanks for the heads-up.

Could you please add some information about the setup in which you encountered that issue?

  • Node version
  • Operating system
  • Test runner used

Thank you :)

  • node 10.13.0
  • macOS Mojave 10.14.1
  • mocha 5.2.0

Thanks.