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

@govuk-frederic/count

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-frederic/count - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

4

es/index.js

@@ -32,7 +32,3 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

Count.propTypes = process.env.NODE_ENV !== "production" ? {
textClass: PropTypes.string,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
} : {};
export default Count;
//# sourceMappingURL=index.js.map

18

es/test.js
import React from 'react';
import { shallow } from 'enzyme';
import Component from '.';
import { mount, shallow } from 'enzyme';
import Count from '.';
describe('Count', function () {
var wrapper;
it('renders without crashing', function () {
wrapper = shallow(React.createElement(Component, {
value: 4
it('renders with only required props', function () {
var wrapper = shallow(React.createElement(Count, {
value: 2
}));
expect(wrapper.exists()).toBe(true);
});
it('displays number passed in correctly', function () {
var wrapper = shallow(React.createElement(Count, {
value: 4
}));
expect(wrapper.find('span').text()).toBe('4');
});
it('matches snapshot', function () {
var wrapper = mount(React.createElement(Count, {
value: 6
}));
expect(wrapper).toMatchSnapshot();

@@ -16,0 +22,0 @@ });

@@ -43,6 +43,2 @@ "use strict";

Count.propTypes = process.env.NODE_ENV !== "production" ? {
textClass: _propTypes.default.string,
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired
} : {};
var _default = Count;

@@ -49,0 +45,0 @@ exports.default = _default;

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

describe('Count', function () {
var wrapper;
it('renders without crashing', function () {
wrapper = (0, _enzyme.shallow)(_react.default.createElement(_.default, {
value: 4
it('renders with only required props', function () {
var wrapper = (0, _enzyme.shallow)(_react.default.createElement(_.default, {
value: 2
}));
expect(wrapper.exists()).toBe(true);
});
it('displays number passed in correctly', function () {
var wrapper = (0, _enzyme.shallow)(_react.default.createElement(_.default, {
value: 4
}));
expect(wrapper.find('span').text()).toBe('4');
});
it('matches snapshot', function () {
var wrapper = (0, _enzyme.mount)(_react.default.createElement(_.default, {
value: 6
}));
expect(wrapper).toMatchSnapshot();

@@ -24,0 +30,0 @@ });

{
"name": "@govuk-frederic/count",
"version": "0.0.3",
"version": "0.1.0",
"dependencies": {

@@ -5,0 +5,0 @@ "@govuk-react/constants": "^0.2.7"

import React from 'react';
import { shallow } from 'enzyme';
import { mount, shallow } from 'enzyme';
import Component from '.';
import Count from '.';
describe('Count', () => {
let wrapper;
it('renders without crashing', () => {
wrapper = shallow(<Component value={4} />);
it('renders with only required props', () => {
const wrapper = shallow(<Count value={2} />);
expect(wrapper.exists()).toBe(true);
});
it('displays number passed in correctly', () => {
const wrapper = shallow(<Count value={4} />);
expect(wrapper.find('span').text()).toBe('4');

@@ -18,4 +18,5 @@ });

it('matches snapshot', () => {
const wrapper = mount(<Count value={6} />);
expect(wrapper).toMatchSnapshot();
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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