Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

TypeError: Cannot read properties of undefined (reading 'parentNode') #256

Open
jcubic opened this issue Sep 11, 2022 · 0 comments
Open

Comments

@jcubic
Copy link

jcubic commented Sep 11, 2022

I'm trying to use the library:

var Benchmark = require('benchmark');

var str = 'A'.repeat(10000);

var suite = new Benchmark.Suite();

suite.add('partition', function() {
    //$.terminal.partition(str);
}).add('split_equal', function() {
    //$.terminal.split_equal(str, 100);
}).run({ 'async': false });

And got this error in NodeJS 18.

this is the stack trace:

/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:664
          parent = sibling.parentNode,
                           ^

TypeError: Cannot read properties of undefined (reading 'parentNode')
    at runScript (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:664:28)
    at createFunction (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:517:9)
    at createFunction (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:524:44)
    at createCompiled (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:1714:23)
    at clock (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:1608:58)
    at clock (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:1818:20)
    at cycle (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:2007:49)
    at Benchmark.run (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:2114:13)
    at execute (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:860:74)
    at invoke (/home/kuba/projects/jcubic/terminal/repo/node_modules/benchmark/benchmark.js:970:20)

I'm testing a library that uses JSDom to work properly in Node.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant