Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stubborn-ws

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stubborn-ws - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

76

package.json
{
"name": "stubborn-ws",
"version": "0.1.2",
"description": "",
"homepage": "https://github.com/ybonnefond/stubborn#stubborn",
"main": "index.js",
"keywords": "stubborn, test, test api, testing, testing web server, nock, dyson, jest, jasmine, mocha",
"scripts": {
"test": "jest",
"test-ci": "mkdir -p coverage && yarn lint && jest --coverage --coverageReporters=lcov && cat ./coverage/lcov.info | coveralls",
"lint": "eslint src",
"doc": "jsdoc2md -f src/*.js > doc/API.md",
"release": "yarn doc && yarn publish"
},
"author": "",
"license": "ISC",
"devDependencies": {
"coveralls": "^3.0.2",
"eslint": "^5.3.0",
"got": "^9.0.0",
"jest": "^23.3.0",
"jest-diff": "^23.2.0",
"jsdoc-to-markdown": "^4.0.1"
},
"jest": {
"testEnvironment": "node",
"collectCoverage": true,
"coverageReporters": [
"html"
],
"coverageDirectory": "coverage",
"collectCoverageFrom": [
"src/**/*.js"
]
},
"dependencies": {
"body-parser": "^1.18.3",
"lodash": "^4.17.10"
}
"name": "stubborn-ws",
"version": "0.1.3",
"description": "",
"homepage": "https://github.com/ybonnefond/stubborn#stubborn",
"main": "src/index.js",
"keywords": "stubborn, test, test api, testing, testing web server, nock, dyson, jest, jasmine, mocha",
"scripts": {
"test": "jest",
"test-ci": "mkdir -p coverage && yarn lint && jest --coverage --coverageReporters=lcov && cat ./coverage/lcov.info | coveralls",
"lint": "eslint src",
"doc": "jsdoc2md -f src/*.js > doc/API.md",
"release": "yarn doc && yarn publish"
},
"author": "",
"license": "ISC",
"devDependencies": {
"coveralls": "^3.0.2",
"eslint": "^5.3.0",
"got": "^9.0.0",
"jest": "^23.3.0",
"jest-diff": "^23.2.0",
"jsdoc-to-markdown": "^4.0.1"
},
"jest": {
"testEnvironment": "node",
"collectCoverage": true,
"coverageReporters": [
"html"
],
"coverageDirectory": "coverage",
"collectCoverageFrom": [
"src/**/*.js"
]
},
"dependencies": {
"body-parser": "^1.18.3",
"lodash": "^4.17.10"
}
}

@@ -32,10 +32,11 @@ # Stubborn

Stubborn is a testing tool that let you **hot** load and unload routes into a webserver.
Requests are **strictly** matched against routes definitions based on Method, Path, Query parameters, Headers and Body.
If the request does not exactly match one route definition (ex: extra parameter, missing parameter, value does not match, etc), Stubborn will respond with a 501.
Stubborn strictly matches requests against on route definitions using rules based on:
- Method
- Path
- Query parameters
- Headers
- Body
The very fact that Stubborn respond to the request validates that the parameters sent are the expected one, any change in the code that send the request will break the test. Any breaking change will be picked up by your test.
Stubborn response headers and body can be hardcoded or defined using a template.
```javascript

@@ -42,0 +43,0 @@ describe('Test', () => {

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