@@ -140,15 +140,17 @@ describe('metacall', () => {
140140 assert . notStrictEqual ( escape , undefined ) ;
141141 assert . strictEqual ( escape ( '<html></html>' ) , '<html></html>' ) ;
142142 } ) ;
143- // TODO: This fails, not sure why
144- /*
145143 it ( 'require (py submodule)' , ( ) => {
146144 // This code loads directly a module without extension from Python
147- const { py_encode_basestring_ascii } = require('json.encoder');
148- assert.notStrictEqual(py_encode_basestring_ascii, undefined);
149- assert.strictEqual(py_encode_basestring_ascii('asd'), '"asd"');
145+ const { find_library } = require ( 'ctypes.util' ) ;
146+ assert . notStrictEqual ( find_library , undefined ) ;
147+
148+ // TODO: This fails because the submodule imports a class, which
149+ // is not yet supported by the NodeJS loader
150+ //const { py_encode_basestring_ascii } = require('json.encoder');
151+ //assert.notStrictEqual(py_encode_basestring_ascii, undefined);
152+ //assert.strictEqual(py_encode_basestring_ascii('asd'), '"asd"');
150153 } ) ;
151- */
152154 it ( 'require (rb)' , ( ) => {
153155 // TODO: Both methods work, should we disable the commented out style to be NodeJS compilant?
154156 // const cache = require('cache.rb');
0 commit comments