question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

index.js is not loading details. Getting exception testResults is not iterable

See original GitHub issue

I am generating html report programmatically. I am setting error when I am loading index.js. Here is the exception

Uncaught TypeError: testResult.testResults is not iterable
    at results.testResults.forEach (view.js:273)
    at Array.forEach (<anonymous>)
    at Function.create (view.js:270)
    at Function.show (view.js:67)
    at HTMLDocument.document.addEventListener (view.js:50)

There is where I am seeing issue

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Constants_1 = require("../Constants");
const Test_1 = require("../tests/Test");
class TestSuite {
    static create(results) {
        const elements = [];
        const describeLevels = [];
        results.testResults.forEach((testResult) => {
            let testStatusClass = Constants_1.Constants.PASSED_TEST;
            const testSectionStatus = new Map();
            for (const result of testResult.testResults) { ------- Exception 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jpranaycommented, Dec 8, 2018

testResultsProcessor

Thanks for the workaround. It worked for me

0reactions
dkeloskycommented, Dec 8, 2018

Thanks, I opened #49. I’ll have a separate enhancement in the future to support assertionResults. I’ll close this one and track there if no objections.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'x' is not iterable - JavaScript - MDN Web Docs
The JavaScript exception "is not iterable" occurs when the value which is given as the right-hand side of for...of , as argument of...
Read more >
assertionResults Documentation Request · Issue #7485
index.js is not loading details. Getting exception testResults is not iterable ... testResults is supposed to be of type jest.
Read more >
TypeError: TestsList is not iterable - javascript
Had to do it the following way. No other thing was working. Hooks and handleTestDeletion had to be moved to Main.js
Read more >
JavaScript TypeError - 'X' is not iterable
This JavaScript exception is not iterable occurs if the value present at the right-hand-side of for…of or as argument of a function such...
Read more >
Configuring Jest
Node.js core modules, like fs , are not mocked by default. ... See the coverageProvider option for more details.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found