Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkav committed Jun 27, 2024
1 parent 2696d14 commit e53a6da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const express = require("express");
const mw = require("./middleware");
const routes = require("./routes");

module.exports = function router(options) {
module.exports = function (options) {
const router = express.Router();

const defaults = [
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/delay.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function delay(req, res, next) {
module.exports = function (req, res, next) {
let delay = req.params.ms ? Number.parseInt(req.params.ms, 10) : 200;

if (delay > 60000) {
Expand Down
15 changes: 2 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,10 @@
"engines": {
"node": ">=22"
},
"files": [
"bin",
"docs",
"src",
"lib",
"server.js"
],
"files": ["bin", "docs", "src", "lib", "server.js"],
"bugs": {
"url": "https://github.com/Kong/mockbin/issues"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"scripts": {
"start": "node server.js",
"dev": "npx nodemon -e pug,js,json server.js",
Expand Down Expand Up @@ -73,4 +62,4 @@
"xmlbuilder": "^15.0.0",
"yamljs": "^0.3.0"
}
}
}
8 changes: 4 additions & 4 deletions test/http/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ app.use("/", mockbin());
require("should");

describe("HTTP", () => {
before(()=>{
before(() => {
server = app.listen(3000);
})
});
after(() => {
server.close();
});
server.close();
});
it("home page responds with html content", async () => {
const res = await fetch("http://localhost:3000/", {
headers: {
Expand Down

0 comments on commit e53a6da

Please sign in to comment.