0

I just got done setting up karma-jasmine in my solution. On the initial test run, I get an error:

Error during loading: Uncaught TypeError: $(...).tooltip is not a function in src.js

tooltip being a function from bootstrap.js. This library is being pulled into my .asp file along with my src.js file being tested. Is there a way to let karma-jasmine know that this function does indeed exist?

Mildfire
  • 323
  • 1
  • 5
  • 15
  • Is it included within your files string array inside of karma? – Esaith May 31 '18 at 21:58
  • @Esaith it is, "js_files/**/*.js", and the location of bootstrap.js is in "js_files" – Mildfire Jun 01 '18 at 14:41
  • 1
    https://stackoverflow.com/questions/41961708/uncaught-typeerror-tooltip-is-not-a-function Have you tried rearranging so that the bootstrap.js is the first file in the array? Although you are adding all the files through the wild card, manually add the file, then do the wild card. – Esaith Jun 01 '18 at 14:45
  • 1
    @Esaith, that did it, thanks man, originally I was writing to say it didnt then realized i put it in the exclude block. If you put that in the answer ill mark it for you – Mildfire Jun 01 '18 at 14:52

0 Answers0