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

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

@jcubic

Description

@jcubic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions