Skip to content

Commit

Permalink
Renamed project and updated Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Nelson committed Feb 9, 2015
1 parent 2030040 commit 77bf4f3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 34 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# Karma-Read-JSON
Karma helper function to make reading JSON files easier
# Karma-JSON-Reader
Helper function for Karma that makes reading JSON files easier

## Install

`bower install karma-read-json`
`bower install karma-json-reader`

## Usage

1. Put karma-read-json.js in your Karma files, Example:
1. Include karma-json-reader.js in your karma.conf.js.

files = [
...
'bower_components/karma-read-json/karma-read-json.js',
...
...
'bower_components/karma-read-json/karma-json-reader.js',
...
]

2. Make sure your JSON is being served by Karma, Example:
2. Include your JSON data in your karma.conf.js.

files = [
...
{pattern: 'json/**/*.json', included: false},
...
...
{ pattern: 'test/data/*.json', watched: true, served: true, included: false },
...
]

3. Use the `readJSON` function in your tests. Example:
3. Use `KarmaJSONReader` to get your JSON data.

var valid_respond = readJSON('json/foobar.json');
$httpBackend.whenGET(/.*/).respond(valid_respond);
var jsonReader = new KarmaJSONReader('path/to/json/files/');
var mockData = jsonReader.readJSON('mockData.json');
41 changes: 21 additions & 20 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "karma-read-json",
"version": "1.0.2",
"homepage": "https://github.com/pizzapanther/Karma-Read-JSON",
"authors": [
"Paul Bailey <[email protected]>"
],
"description": "helper function for Karma to read JSON files easier",
"main": "karma-read-json.js",
"keywords": [
"karma",
"json"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
"name": "karma-read-json",
"version": "1.0.3",
"homepage": "https://github.com/osidenate/Karma-Read-JSON",
"authors": [
"Paul Bailey <[email protected]>",
"Nathan Nelson <[email protected]>"
],
"description": "Helper function for Karma that makes reading JSON files easier",
"main": "karma-read-json.js",
"keywords": [
"karma",
"json"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
File renamed without changes.

0 comments on commit 77bf4f3

Please sign in to comment.