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

GraphQL error preventing tests being shown #222

Open
IPWright83 opened this issue Jan 14, 2022 · 2 comments
Open

GraphQL error preventing tests being shown #222

IPWright83 opened this issue Jan 14, 2022 · 2 comments

Comments

@IPWright83
Copy link

Is this a bug report or a feature request?

Bug

Version Info

  • Version of Majestic: 1.8.1
  • Version of Jest: 6.14.12
  • Version of Node: 12.22.1
  • Operating System: Ubuntu 20.04.3

Reproduction Repo

I can't really provide a quick reproduction, but I am happy to dig and find more information to diagnose. Essentially I get no tests shown in the file window for 1 particular file. I've not encountered this issue with any other files:

image

When selecting the file I encounter the following error in the console:

Uncaught (in promise) Error: GraphQL error: Unexpected token (7:12)
    at new t (ui.bundle.js:21)
    at e.<anonymous> (ui.bundle.js:21)
    at ui.bundle.js:16
    at Object.next (ui.bundle.js:16)
    at ui.bundle.js:16
    at new Promise (<anonymous>)
    at l (ui.bundle.js:16)
    at ui.bundle.js:21
    at ui.bundle.js:21
    at Array.forEach (<anonymous>)
t @ ui.bundle.js:21
(anonymous) @ ui.bundle.js:21
(anonymous) @ ui.bundle.js:16
(anonymous) @ ui.bundle.js:16
(anonymous) @ ui.bundle.js:16
l @ ui.bundle.js:16
(anonymous) @ ui.bundle.js:21
(anonymous) @ ui.bundle.js:21
(anonymous) @ ui.bundle.js:21
e.broadcastQueries @ ui.bundle.js:21
(anonymous) @ ui.bundle.js:21
(anonymous) @ ui.bundle.js:16
(anonymous) @ ui.bundle.js:16
(anonymous) @ ui.bundle.js:16
l @ ui.bundle.js:16
next @ ui.bundle.js:21
g @ ui.bundle.js:51
b @ ui.bundle.js:51
value @ ui.bundle.js:51
(anonymous) @ ui.bundle.js:21
next @ ui.bundle.js:21
g @ ui.bundle.js:51
b @ ui.bundle.js:51
value @ ui.bundle.js:51
(anonymous) @ ui.bundle.js:92
Promise.then (async)
(anonymous) @ ui.bundle.js:21
ha @ ui.bundle.js:42
(anonymous) @ ui.bundle.js:42
c @ ui.bundle.js:51
d @ ui.bundle.js:51
B.port1.onmessage @ ui.bundle.js:51

The pre-ceding request if it's helpful is this. I've looked for odd characters in the describe/it names but can't see anything out of sorts.

{result: {…}}
  result:
    consoleLogs: null
    failureMessage: null
    numFailingTests: 0
    numPassingTests: 5
    path: "/home/ian/src/webclient/app/src/views/solutions/components/PaginatedTable/PaginatedTable.test.tsx"
    testResults: Array(5)
      0: {title: 'with no data', numPassingAsserts: 0, status: 'passed', failureMessages: Array(0), ancestorTitles: Array(2), …}
      1: {title: 'with data', numPassingAsserts: 0, status: 'passed', failureMessages: Array(0), ancestorTitles: Array(2), …}
      2: {title: 'with a custom header cell', numPassingAsserts: 0, status: 'passed', failureMessages: Array(0), ancestorTitles: Array(2), …}
      3: {title: 'with a custom data cell', numPassingAsserts: 0, status: 'passed', failureMessages: Array(0), ancestorTitles: Array(2), …}
      4: {title: 'with more than 8 rows', numPassingAsserts: 0, status: 'passed', failureMessages: Array(0), ancestorTitles: Array(2), …}
      length: 5
      [[Prototype]]: Array(0)
      __typename: "TestFileResult"
    [[Prototype]]: Object
  [[Prototype]]: Object
@davidlav
Copy link

Yep, some problem here in Firefox (pictured), Chrome, and Edge.

Version of Majestic: 1.8.1
Version of Jest: 27.5.1
Version of Node: 16.3.0
Operating System: Windows 10

image

@ojaoc
Copy link

ojaoc commented May 4, 2022

I submited a PR to solve a similar issue, turns out the parser was breaking on numeric separators, but might still be happening in other situations. Nonetheless, PR #224

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