GithubHelp home page GithubHelp logo

Comments (4)

t-mullen avatar t-mullen commented on September 26, 2024

Spent some time assessing our test effort today.

Adding code coverage would be a good place to start with this. I wasn't able to get it working with istanbul-coverage, karma-coverage, nyc+instabul-instrument-loader or karma-typescript's coverage though. Those modules really dislike the inclusion of non-code files like SVG. Maybe someone more adept with webpack could take a look.

There are several commented-out unit tests already. They fail with a cryptic "Script Error" that I wasn't able to debug (it has no trace at all).

The existing tests are fragile and fail intermittently. They're all wrapped in timeouts, which could be part of the problem (is this normal for Jasmine tests?).

from carbon-charts.

theiliad avatar theiliad commented on September 26, 2024

We will potentially replace webpack with Rollup. What are the possibilities there?

The tests that use setTimeouts are testing functionality that the library needs to run and update DOM.

from carbon-charts.

t-mullen avatar t-mullen commented on September 26, 2024

I'm not sure about Rollup. I noticed some incompatibilities with how webpack does module loading (nyc for example relies on your module loader overriding "require"), so it might help.

Apparently ES6+TypeScript+Karma+Webpack is just not a usecase that any of the code coverage tools account for.

I did manage to get instrumentation working with istanbul-instrument-loader, but none of the coverage tools I tried would report correctly.

from carbon-charts.

theiliad avatar theiliad commented on September 26, 2024

UPDATE

@t-mullen & I are putting together a full test plan (WIP currently), and will start with unit-tests, but will also implement code-coverage analysis down the road:
https://github.com/IBM/carbon-charts/wiki/Test-Plan-for-v1.0

from carbon-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.