karma-json-fixtures-preprocessor
Preprocessor for converting .json files into .js files and making them accessible from karma test environment
Installation
Configuration
// karma.conf.jsmodule { config;};
How it works
Preprocessor requires .json files and converts them into .js files by storing json data as javascript objects under __fixtures__
namespace.
the following file:
./fixtures/test.json
will be accessible in your test environment:
var fixture = window__fixtures__'fixtures/test';fixture"a" // => 'test'