Skip to content

Commit

Permalink
Rename to ermock
Browse files Browse the repository at this point in the history
  • Loading branch information
cenobitedk committed Jan 13, 2020
1 parent c30e4fe commit a76f097
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# express-request-mock
# ermock

Express middleware to mock requests with JSON and JS files.

Expand All @@ -12,14 +12,14 @@ Express middleware to mock requests with JSON and JS files.
## Installation

```
npm i express-request-mock
npm i ermock
```

## Usage

```
const express = require("express");
const ermock = require("express-request-mock");
const ermock = require("ermock");
const app = express();
Expand Down
5 changes: 3 additions & 2 deletions lib/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const { cosmiconfigSync } = require("cosmiconfig");
const { isString, isNumber, isPlainObject } = require("is-what");
const path = require("path");
const debug = require("debug")("express-request-mock");
const pkg = require("../package.json");
const debug = require("debug")(pkg.name);

const defaults = require("./defaults");
const cwd = process.cwd();
Expand Down Expand Up @@ -55,7 +56,7 @@ function validateConfiguration(configuration) {
}

function resolveConfig() {
const explorer = cosmiconfigSync("ermock");
const explorer = cosmiconfigSync(pkg.name);
return explorer.search();
}

Expand Down
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { pathToRegexp } = require("path-to-regexp");
const debug = require("debug")("express-request-mock");
const pkg = require("../package.json");
const debug = require("debug")(pkg.name);
const cors = require("cors");
const path = require("path");

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "express-request-mock",
"name": "ermock",
"version": "1.0.0",
"description": "Express middleware to mock requests with js and json files",
"author": "Jeppe Hasseriis",
Expand All @@ -23,12 +23,12 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/cenobitedk/express-request-mock.git"
"url": "git+https://github.com/cenobitedk/ermock.git"
},
"bugs": {
"url": "https://github.com/cenobitedk/express-request-mock/issues"
"url": "https://github.com/cenobitedk/ermock/issues"
},
"homepage": "https://github.com/cenobitedk/express-request-mock#readme",
"homepage": "https://github.com/cenobitedk/ermock#readme",
"keywords": [
"express",
"middleware",
Expand Down

0 comments on commit a76f097

Please sign in to comment.