spkellydev / chartjs-plugin-lineheight-annotation

Draw lines to the top of a datapoint in with a small, lightweight and reliable ChartJS plugin for Line charts specifically. This plugin was made to be compatible with the react-chartjs-2 library, but it is available as a commonjs and umd module, as well.
https://www.npmjs.com/package/chartjs-plugin-lineheight-annotation
11 stars 4 forks source link

Issue while running tests. #4

Open vishnup95 opened 4 years ago

vishnup95 commented 4 years ago

Hi,

Thanks for this plugin. We use it in our project. Currently while trying to test the react app, we seem to encounter the following error with respect to this library.

/**/**/**/Project_name/node_modules/chartjs-plugin-lineheight-annotation/src/plugin.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import Chart from "chart.js";

` SyntaxError: Unexpected token import

  2 | import { Line, Chart } from "react-chartjs-2";
  3 | import { Component } from "react";
> 4 | import "chartjs-plugin-lineheight-annotation";
    | ^
  5 | import mixpanel from 'mixpanel-browser';
  6 | import { withTranslation } from "react-i18next";
  7 | 

`

Do you have any insights on this? This seems to happen when running any test. For eg, we have written a shallow test for App.js.

Oakerin commented 4 years ago

@vishnup95 Hello!

Did you fix that? I have the same issue

vishnup95 commented 4 years ago

Sorry, no, we didn't fix this.