Skip to content

Commit c473758

Browse files
committed
Avoid memory leak in test due to duplicated JSONEncoder import from python json package (this is a bug to be solved in other PR).
1 parent d7fb8b1 commit c473758

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/ports/node_port/test/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ describe('metacall', () => {
9797
});
9898
it('require (py module)', () => {
9999
// This code loads directly a module without extension from Python
100-
const { loads } = require('json');
101-
assert.notStrictEqual(loads, undefined);
102-
assert.deepStrictEqual(loads('["foo", "bar"]'), ['foo', 'bar']);
100+
const { escape } = require('html');
101+
assert.notStrictEqual(escape, undefined);
102+
assert.strictEqual(escape('<html></html>'), '&lt;html&gt;&lt;/html&gt;');
103103
});
104104
it('require (py submodule)', () => {
105105
// This code loads directly a module without extension from Python

0 commit comments

Comments
 (0)