Giter Site home page Giter Site logo

chartjs-test-utils's People

Contributors

benmccann avatar dependabot[bot] avatar etimberg avatar joshkel avatar kurkle avatar snoozbuster avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chartjs-test-utils's Issues

Change karma and jasmine to peer deps?

I found this package while looking at how the main chartjs repo does their testing, because I wanted to see if I could integrate canvas testing into a project at my org. The fact that all the hairy fuzzy matching logic is part of a package was great, but I was bummed to find that it depended on karma and jasmine. Reading through the code, it looks like there is a single dependency on jasmine and a single dependency on karma, both of which are environment-based rather than explicit imports. We don't use karma or jasmine in this project (specifically, I was hoping to adapt the matchers to cypress, whose assertion library is based on mocha) but it seems like a shame to install these dependencies just for these two references. The jasmine one can be easily removed by changing the signature to something like function addMatchers(jasmine) - karma.__files__ I am less sure about (I couldn't even find documentation on this magic string) but if I don't use addMatchers or specsFromFixtures, these dependencies are totally unused.

Would it be possible to open a PR to change jasmine and karma to be peer deps instead of hard dependencies? Ideally, I would love the utils to be exported in a framework-agnostic way, and have separate layers on top for karma/jasmine and cypress/mocha (or jest/node-canvas, or whatever) but that's a much larger change and in the meantime I can write my own conversion utility to convert the matchers from jasmine -> mocha so that's not particularly a blocker. Mostly just wanted to open this and get some eyes on it to make sure I wouldn't open a PR that no one will ever look at.

Missing declaration file

Could not find a declaration file for module 'chartjs-test-utils'. 'C:/Users/Sehreen Khan/Desktop/Comparison of analytics libraries/AnalyticsComparison/analytics/node_modules/chartjs-test-utils/dist/chartjs-test-utils.js' implicitly has an 'any' type.
Try npm i --save-dev @types/chartjs-test-utils if it exists or add a new declaration (.d.ts) file containing declare module 'chartjs-test-utils';

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.