preprocessor for converting INI files to JS test fixtures
The easiest way is to keep karma-ini2js-preprocessor
as a devDependency in
your package.json
.
{
"devDependencies": {
"karma": "~0.10",
"karma-ini2js-preprocessor": "~0.1"
}
}
You can simply do it by:
npm install karma-ini2js-preprocessor --save-dev
This preprocessor converts INI files into JS objects and publishes them in the
global window.__ini__
so that they may be used for tests.
ex: config.ini
[config]
debug = true
address = http://altalang.com/
becomes
window.__ini__['config.ini'] = {
config: {
debug: true,
address: 'http://altalang.com/'
}
}
For more information on Karma see the homepage.