Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you serve svg and fixtures with Karma Runner (aka Testacular)
    primarykey
    data
    text
    <p>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.</p> <p>Following the second answer on this thread: <a href="https://stackoverflow.com/questions/13019215/error-while-integrating-html-with-testacularjs">Error while integrating html with testacularjs</a> I've been trying to use <code>served</code> to indicate that my fixtures and svg file should be distributed by the server but I'm still getting 'NOT FOUND's</p> <pre><code>files = [ JASMINE, JASMINE_ADAPTER, REQUIRE, REQUIRE_ADAPTER, // put all components in requirejs 'paths' config here (included: false) { pattern: 'preview/public/components/**/*.js', included: false }, { pattern: 'preview/public/js/**/*.js', included: false }, // assets { pattern: 'preview/public/img/svg/*.svg', included: false, served: true }, // helpers &amp; fixtures for jasmine-jquery { pattern: 'test/libs/**/*.js', included: true }, { pattern: 'test/fixtures/**/*.html', included: false, served: true }, // all src and test modules (included: false) { pattern: 'test/specs/**/*.spec.js', included: false }, // test main require module last 'test/test-main.js' ]; </code></pre> <p>I'm setting the <code>jasmine.getFixtures().fixturesPath</code> to <code>/fixtures</code> and I can see that it's using the correct path but I still end up with...</p> <p><code>GET http://localhost:9876/img/svg/directional-pad-gradients.svg 404 (Not Found)</code> <code>GET http://localhost:9876/fixtures/directional-pad.html 404 (Not Found)</code></p> <p>If anyone has an example of loading fixtures and/or svg with Karma runner I would <strong>really</strong> love to take a look. Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload