Skip to content

Commit 4adc65a

Browse files
committed
trigger gc in test
1 parent af75e0b commit 4adc65a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
shell: cmd
2323
run: chcp 65001
2424
- run: npm ci
25-
- run: node --test
25+
- run: node --expose-gc --test

test/test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ TEST( 'smoke-test', async() => {
1717
ASSERT.equal( typeof enumerator.item().Name, 'string');
1818
}
1919
console.log( 'remote objects:', wsh.remoteObjects.count);
20+
if( typeof global.gc === 'function') {
21+
global.gc();
22+
console.log( 'remote objects:', wsh.remoteObjects.count);
23+
}
2024
} finally {
2125
await wsh.disconnect();
2226
}

0 commit comments

Comments
 (0)