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

@jest-mock/express

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest-mock/express - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/src/request/index.d.ts

@@ -7,3 +7,3 @@ /// <reference types="jest" />

import type { Request } from 'express-serve-static-core';
import type { EventEventEmitter } from 'src';
import type { EventEventEmitter } from '../index';
interface StreamReadable extends EventEventEmitter {

@@ -10,0 +10,0 @@ readable?: Readable['readable'];

@@ -1,2 +0,3 @@

import { Request } from 'express';
/// <reference types="qs" />
import type { Request } from 'express';
import type { MockRequest } from './index';

@@ -6,3 +7,3 @@ /**

*/
export declare const getMockReq: <T extends Request<import("express-serve-static-core").ParamsDictionary, any, any, ParsedQs, Record<string, any>>>(values?: MockRequest) => T;
export declare const getMockReq: <T extends Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>>(values?: MockRequest) => T;
export default getMockReq;

@@ -7,3 +7,3 @@ /// <reference types="jest" />

import type { Response } from 'express';
import type { EventEventEmitter } from 'src';
import type { EventEventEmitter } from '../index';
interface StreamWritable extends EventEventEmitter {

@@ -10,0 +10,0 @@ writable?: Writable['writable'];

@@ -1,2 +0,2 @@

import { Response, NextFunction } from 'express';
import type { Response, NextFunction } from 'express';
import type { MockResponse } from './index';

@@ -3,0 +3,0 @@ /**

@@ -12,3 +12,3 @@ "use strict";

(function (AppOS) {
AppOS[AppOS["Android"] = 1] = "Android";
AppOS["Android"] = "1";
})(AppOS || (AppOS = {}));

@@ -15,0 +15,0 @@ const req = (0, request_1.default)({

@@ -18,4 +18,4 @@ "use strict";

id: '123',
limit: 10,
page: 2,
limit: '10',
page: '2',
},

@@ -31,6 +31,6 @@ });

expect(req.query['id']).toBe('123');
expect(req.query['limit']).toBe(10);
expect(req.query['page']).toBe(2);
expect(req.query['limit']).toBe('10');
expect(req.query['page']).toBe('2');
});
});
//# sourceMappingURL=provided.test.js.map
{
"name": "@jest-mock/express",
"version": "2.0.0",
"version": "2.0.1",
"description": "A lightweight Jest mock for unit testing Express",

@@ -45,3 +45,2 @@ "main": "dist/index.js",

"@snyk/protect": "^1.947.0",
"@types/express": "^4.17.13",
"@types/jest": "^27.5.1",

@@ -58,4 +57,6 @@ "@typescript-eslint/eslint-plugin": "^5.27.1",

},
"dependencies": {},
"dependencies": {
"@types/express": "^4.17.13"
},
"snyk": true
}

@@ -5,4 +5,6 @@ // Types

import type { Request } from 'express-serve-static-core'
import type { EventEventEmitter } from 'src'
// Local Types
import type { EventEventEmitter } from '../index'
interface StreamReadable extends EventEventEmitter {

@@ -9,0 +11,0 @@ readable?: Readable['readable']

@@ -1,5 +0,5 @@

// Libraries
import { Request } from 'express'
// Types
import type { Request } from 'express'
// Types
// Local Types
import type { MockRequest } from './index'

@@ -6,0 +6,0 @@

@@ -5,4 +5,6 @@ // Types

import type { Response } from 'express'
import type { EventEventEmitter } from 'src'
// Local Types
import type { EventEventEmitter } from '../index'
interface StreamWritable extends EventEventEmitter {

@@ -9,0 +11,0 @@ writable?: Writable['writable']

@@ -1,5 +0,5 @@

// Libraries
import { Response, NextFunction } from 'express'
// Types
import type { Response, NextFunction } from 'express'
// Types
// Local Types
import type { MockResponse } from './index'

@@ -6,0 +6,0 @@

@@ -10,3 +10,3 @@ // Types

enum AppOS {
Android = 1,
Android = '1',
}

@@ -13,0 +13,0 @@

@@ -27,4 +27,4 @@ // Types

id: '123',
limit: 10,
page: 2,
limit: '10',
page: '2',
},

@@ -42,5 +42,5 @@ })

expect(req.query['id']).toBe('123')
expect(req.query['limit']).toBe(10)
expect(req.query['page']).toBe(2)
expect(req.query['limit']).toBe('10')
expect(req.query['page']).toBe('2')
})
})

Sorry, the diff of this file is not supported yet

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