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

artificial

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artificial - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

6

lib/index.js
'use strict';
const Assert = require('assert');
const Joi = require('joi');
const Request = require('shot/lib/request');
const Response = require('shot/lib/response');
const Joi = require('@hapi/joi');
const Request = require('@hapi/shot/lib/request');
const Response = require('@hapi/shot/lib/response');

@@ -8,0 +8,0 @@ const schema = Joi.object().keys({

{
"name": "artificial",
"version": "0.1.0",
"version": "1.0.0",
"description": "Inject fake HTTP request/response into an Express server",
"author": "Continuation Labs <contact@continuation.io> (http://continuation.io/)",
"author": "Colin J. Ihrig <cjihrig@gmail.com> (http://www.cjihrig.com/)",
"main": "lib/index.js",
"homepage": "https://github.com/continuationlabs/artificial",
"homepage": "https://github.com/cjihrig/artificial",
"repository": {
"type": "git",
"url": "git+https://github.com/continuationlabs/artificial.git"
"url": "git+https://github.com/cjihrig/artificial.git"
},
"bugs": {
"url": "https://github.com/continuationlabs/artificial/issues"
"url": "https://github.com/cjihrig/artificial/issues"
},

@@ -24,9 +24,10 @@ "license": "MIT",

"dependencies": {
"joi": "10.6.0",
"shot": "3.4.2"
"@hapi/joi": "15.x.x",
"@hapi/shot": "4.1.x"
},
"devDependencies": {
"belly-button": "4.x.x",
"express": "4.x.x",
"lab": "14.x.x"
"@hapi/lab": "19.x.x",
"belly-button": "6.x.x",
"cb-barrier": "1.x.x",
"express": "4.x.x"
},

@@ -33,0 +34,0 @@ "keywords": [

# artificial
[![Current Version](https://img.shields.io/npm/v/artificial.svg)](https://www.npmjs.org/package/artificial)
[![Build Status via Travis CI](https://travis-ci.org/continuationlabs/artificial.svg?branch=master)](https://travis-ci.org/continuationlabs/artificial)
![Dependencies](http://img.shields.io/david/continuationlabs/artificial.svg)
[![Build Status via Travis CI](https://travis-ci.org/cjihrig/artificial.svg?branch=master)](https://travis-ci.org/cjihrig/artificial)
![Dependencies](http://img.shields.io/david/cjihrig/artificial.svg)
[![belly-button-style](https://img.shields.io/badge/eslint-bellybutton-4B32C3.svg)](https://github.com/cjihrig/belly-button)
[![belly-button-style](https://cdn.rawgit.com/continuationlabs/belly-button/master/badge.svg)](https://github.com/continuationlabs/belly-button)
Inject fake HTTP request/response into an Express server. This is a port of hapi's [`shot`](https://github.com/hapijs/shot) module, adapted to work with Express. `artificial` allows fake responses to be injected into a server without first binding to a port. This simplifies testing.

@@ -42,2 +41,2 @@

Defines an injection method on an Express server. By default, the method is `inject()`. The method's behavior is described in [hapi's `server.inject(options [, callback])` documentation](https://github.com/hapijs/hapi/blob/master/API.md#serverinjectoptions-callback).
Defines an injection method on an Express server. By default, the method's name is `inject()`. This method injects a request into the server, simulating an incoming HTTP request without using sockets. Injection is useful for testing purposes, as well as for invoking routing logic internally without the overhead and limitations of the network stack.

Sorry, the diff of this file is not supported yet

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