Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test module fails with not ascii text #46159

Closed
nassau-t opened this issue Jan 10, 2023 · 2 comments
Closed

test module fails with not ascii text #46159

nassau-t opened this issue Jan 10, 2023 · 2 comments

Comments

@nassau-t
Copy link

Version

v19.3.0

Platform

Microsoft Windows NT 10.0.19044.0 x64

Subsystem

test

What steps will reproduce the bug?

a file with

const assert = require('node:assert');
const test = require('node:test');

test('test síncron', (t) => {
  assert.equal('2', '2');
});

execute it with

node --test test.node.js

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

ever

What is the expected behavior?

it should print

TAP version 13
# Subtest: C:\\temp\\test.node.js
    # Subtest: test sincron
    ok 1 - test sincron
      ---
      duration_ms: 2.1855
      ...
    1..1
ok 1 - C:\\temp\\test.node.js
  ---
  duration_ms: 56.617
  ...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 59.3344

What do you see instead?

it shows

TAP version 13
# Subtest: C:\\temp\\test.node.js
not ok 1 - C:\\temp\\test.node.js
  ---
  duration_ms: 54.849
  failureType: 'uncaughtException'
  error: 'Unexpected character: í at line 1, column 0'
  code: 'ERR_TAP_LEXER_ERROR'
  stack: |-
    Socket.emit (node:events:513:28)
    Socket.read (node:net:731:39)
    async Promise.all (index 1)
  ...
1..1
# tests 1
# pass 0
# fail 1
# cancelled 0
# skipped 0
# todo 0
# duration_ms 61.0132

Additional information

There is a problem with not ascii í character of síncron.

@richardlau
Copy link
Member

Duplicate of #45706.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 10, 2023

Thanks for reporting. I'm going to close this as a duplicate of #45706.

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

No branches or pull requests

3 participants