How do you serve svg and fixtures with Karma Runner (aka Testacular)

后端 未结 2 1953
小鲜肉
小鲜肉 2020-12-31 06:56

I\'ve been trying for the past two hours to get Karma runner to serve an svg file and an html fixture but so far no luck.

Following the second answer on this thread:

2条回答
  •  青春惊慌失措
    2020-12-31 06:59

    Answering my own question here...

    I was trying to load my fixtures athttp://localhost:9876/fixtures/directional-pad.html

    Instead I should have tried accessing them at http://localhost:9876/base/test/fixtures/directional-pad.html

    Karma stores everything under the base/ route, so any static file routes you add will need to start with that.

提交回复
热议问题