(ref, label)
| 5 | const debug = DEBUG('reference-count-tests'); |
| 6 | |
| 7 | async function waitForGC(ref, label) { |
| 8 | assert(global.gc, 'global.gc is not exposed. use --expose-gc'); |
| 9 | // wait for the device to be collected |
| 10 | while (ref.deref()) { |
| 11 | debug('gc'); |
| 12 | global.gc(); |
| 13 | await new Promise(resolve => setTimeout(resolve, 1000)); |
| 14 | } |
| 15 | debug(label, 'was GCed'); |
| 16 | } |
| 17 | |
| 18 | await describe('reference count tests', async () => { |
| 19 |
no outgoing calls
no test coverage detected