Mark Yuan
Mark Yuan

Reputation: 860

Jasmine preload necessary javascript files before running the testing spec

I got 2 javascript files:

  1. jquery.js which I want to write unit test for.

  2. jquery.test.js which contains jasmine describes that aimed to test the jquery functionality.

Is there any way to preload the jquery.js in jquery.test.js or somewhere else so I can reference the $ symbol?

Upvotes: 0

Views: 286

Answers (1)

dm03514
dm03514

Reputation: 55952

karma files config option should have all the files loaded for when test is executed.

https://karma-runner.github.io/1.0/config/files.html

Upvotes: 1

Related Questions