New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

karma-json-fixtures-preprocessor

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-json-fixtures-preprocessor - npm Package Compare versions

Comparing version 0.0.1 to 0.0.3

.travis.yml

7

json_fixtures.js

@@ -19,2 +19,6 @@ module.exports = (function () {

var transformPath = config.transformPath || function(filepath) {
return filepath.replace(/\.json$/, '.js');
};
return function (content, file, done) {

@@ -31,3 +35,4 @@ var fixtureName = file.originalPath

file.path = file.path.replace(/\.json$/, '.js');
// transform file path
file.path = transformPath(file.path);

@@ -34,0 +39,0 @@ done(util.format(template, fixtureName, content));

15

package.json
{
"name": "karma-json-fixtures-preprocessor",
"version": "0.0.1",
"version": "0.0.3",
"description": "A Karma plugin to compile JSON files and make them accessible from Javascript code",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "./node_modules/karma/bin/karma start ./test/test_karma.conf.js --single-run"
},

@@ -26,3 +26,12 @@ "repository": {

},
"homepage": "https://github.com/dmitriiabramov/karma-json-fixtures-preprocessor"
"homepage": "https://github.com/dmitriiabramov/karma-json-fixtures-preprocessor",
"devDependencies": {
"chai": "^3.0.0",
"karma": "^0.12.36",
"karma-chai": "^0.1.0",
"karma-mocha": "^0.1.10",
"karma-phantomjs-launcher": "^0.2.0",
"mocha": "^2.2.5",
"phantomjs": "^1.9.17"
}
}
karma-json-fixtures-preprocessor
================================
[![Build Status](https://travis-ci.org/dmitriiabramov/karma-json-fixtures-preprocessor.svg)](https://travis-ci.org/dmitriiabramov/karma-json-fixtures-preprocessor)
##### Preprocessor for converting .json files into .js files and making them accessible from karma test environment

@@ -11,3 +13,3 @@

"karma": "~0.12.1",
"karma-json-fixtures-preprocessor": "0.0.0"
"karma-json-fixtures-preprocessor": "0.0.1"
}

@@ -35,3 +37,7 @@ }

// change the global fixtures variable name
variableName: '__mocks__'
variableName: '__mocks__',
// transform the filename
transformPath: function(path) {
return path + '.js';
}
}

@@ -38,0 +44,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc