Skip to content

[Archlinux Build] libstdc++ std::vector assert with --watch #49544

Description

@Gabriel-Tapes

Version

20.6.0

Platform

Linux archlinux 6.1.51-1-lts #1 SMP PREEMPT_DYNAMIC Sat, 02 Sep 2023 14:51:30 +0000 x86_64 GNU/Linux

Subsystem

node test runner in watch mode

What steps will reproduce the bug?

I'm trying to run a simple test in watch mode, like this:

// index.test.js

import { describe, it } from 'node:test'
import assert from 'node:assert'

describe('test', () => {
  it('should sum two numbers', () => {
    assert.equal(2 + 2, 4)
  })
})

with the command

node --test --watch

like in the documentation.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

/usr/include/c++/13.2.1/bits/stl_vector.h:1125: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operat
or[](size_type) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<cha
r> >; reference = std::__cxx11::basic_string<char>&; size_type = long unsigned int]: Assertion '__n < this->size()' 
failed.
fish: Task 1, '/bin/node --test --watch' closed by signal SIGABRT (Aborted)

Additional information

if I run node --test instead, everything works perfectely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    test_runnerIssues and PRs related to the test runner subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions