1

error showing d3 is not defined when run test command "npm test". enter image description here

Below image is my test script enter image description here

Pie chart code is below image

e

skyboyer
  • 22,209
  • 7
  • 57
  • 64
wpmarts
  • 532
  • 6
  • 8
  • How did you add D3js to your project? are you importing D3 to the script you are testing? – ROOT Jan 18 '20 at 08:44
  • Yes. I added D3 in the script. – wpmarts Jan 19 '20 at 12:31
  • from the images, I think you need to require `d3` library just like you did with `chatbot-pie` library or maybe you can include it using your testing lib as a dependency, the error says that its not included in the testing function scope. – ROOT Jan 19 '20 at 12:39
  • please give me an example to include lib and where to add. – wpmarts Jan 20 '20 at 04:50

0 Answers0