New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

oc-registry-graphql-express-middleware

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oc-registry-graphql-express-middleware - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

38

__tests__/index.test.js

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

const fetch = require('node-fetch');
// const fetch = require('node-fetch');
const factory = require('../src');
const options = {
baseUrl: 'http://mock:3000/',
baseUrl: 'https://pink-pineapple.herokuapp.com/',
graphiql: true,

@@ -69,30 +69,8 @@ dependencies: ['graphql', 'lodash', 'moment']

test.skip('expect res setHeader and end to match snapshot', async () => {
// todo: change mockResponse
fetch.mockResponse(JSON.stringify({
href: options.baseUrl,
ocVersion: '1.2.3',
type: 'mock-registry',
components: [
`${options.baseUrl}oc-a-component`
],
name: 'oc-a-component',
description: 'Awesome OpenComponent',
version: '4.5.6',
allVersions: ['4.5.4', '4.5.5', '4.5.6'],
oc: {
parameters: {
id: {
type: 'string',
mandatory: true,
example: '815',
description: 'The Id'
}
}
}
}));
test('expect res setHeader and end to match snapshot', async () => {
const req = {
method: 'GET',
headers: {},
headers: {
'Content-Type': 'application/json'
},
url: `?query=${query}`

@@ -105,4 +83,6 @@ };

expect(res.setHeader).toHaveBeenCalled();
expect(res.setHeader.mock.calls).toMatchSnapshot();
expect(res.end.mock.calls).toMatchSnapshot();
expect(res.end).toHaveBeenCalled();
expect(JSON.parse(res.end.mock.calls)).toMatchSnapshot();
});
{
"name": "oc-registry-graphql-express-middleware",
"version": "1.1.1",
"version": "1.1.2",
"description": "OpenComponent Registry GraphQL Express middleware.",

@@ -5,0 +5,0 @@ "main": "index.js",

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

/*
require('isomorphic-fetch');

@@ -5,1 +6,2 @@ const fetch = require('jest-fetch-mock');

jest.setMock('node-fetch', fetch);
*/

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