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

@govuk-react/error-text

Package Overview
Dependencies
Maintainers
5
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@govuk-react/error-text - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

src/index.tsx

3

es/index.js
import styled from 'styled-components';
import React from 'react';
import PropTypes from 'prop-types';
import { ERROR_COLOUR } from 'govuk-colours';

@@ -9,3 +8,3 @@ import { SPACING_POINTS } from '@govuk-react/constants';

displayName: "src__StyledError",
componentId: "q8g4f0-0"
componentId: "kkeaok-0"
})(typography.font({

@@ -12,0 +11,0 @@ size: 19,

import React from 'react';
import ReactDOM from 'react-dom';
import { mount } from 'enzyme';
import { render } from '@testing-library/react';
import ErrorText from '.';
describe('ErrorText', function () {
var example = 'example';
var wrapper = /*#__PURE__*/React.createElement(ErrorText, null, example);
it('renders without crashing', function () {
var div = document.createElement('div');
ReactDOM.render(wrapper, div);
it('renders contents without crashing', function () {
var contents = 'Example';
var _render = render( /*#__PURE__*/React.createElement(ErrorText, null, contents)),
getByText = _render.getByText;
expect(getByText(contents)).toBeInTheDocument();
});
it('matches wrapper snapshot', function () {
expect(mount(wrapper)).toMatchSnapshot('wrapper mount');
});
});
//# sourceMappingURL=test.js.map

@@ -10,4 +10,2 @@ "use strict";

var _propTypes = _interopRequireDefault(require("prop-types"));
var _govukColours = require("govuk-colours");

@@ -23,3 +21,3 @@

displayName: "src__StyledError",
componentId: "q8g4f0-0"
componentId: "kkeaok-0"
})(_lib.typography.font({

@@ -26,0 +24,0 @@ size: 19,

@@ -5,6 +5,4 @@ "use strict";

var _reactDom = _interopRequireDefault(require("react-dom"));
var _react2 = require("@testing-library/react");
var _enzyme = require("enzyme");
var _ = _interopRequireDefault(require("."));

@@ -15,15 +13,11 @@

describe('ErrorText', function () {
var example = 'example';
it('renders contents without crashing', function () {
var contents = 'Example';
var wrapper = /*#__PURE__*/_react["default"].createElement(_["default"], null, example);
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_["default"], null, contents)),
getByText = _render.getByText;
it('renders without crashing', function () {
var div = document.createElement('div');
_reactDom["default"].render(wrapper, div);
expect(getByText(contents)).toBeInTheDocument();
});
it('matches wrapper snapshot', function () {
expect((0, _enzyme.mount)(wrapper)).toMatchSnapshot('wrapper mount');
});
});
//# sourceMappingURL=test.js.map
{
"name": "@govuk-react/error-text",
"version": "0.9.0",
"version": "0.9.1",
"dependencies": {
"@govuk-react/constants": "^0.9.0",
"@govuk-react/lib": "^0.9.0",
"@govuk-react/constants": "^0.9.1",
"@govuk-react/lib": "^0.9.1",
"govuk-colours": "^1.1.0"

@@ -15,4 +15,4 @@ },

"build": "yarn build:lib && yarn build:es",
"build:lib": "rimraf lib && babel src -d lib --source-maps --config-file ../../babel.config.js",
"build:es": "rimraf es && cross-env BABEL_ENV=es babel src -d es --source-maps --config-file ../../babel.config.js",
"build:lib": "rimraf lib && babel src -x .js,jsx,.ts,.tsx -d lib --source-maps --config-file ../../babel.config.js",
"build:es": "rimraf es && cross-env BABEL_ENV=es babel src -x .js,jsx,.ts,.tsx -d es --source-maps --config-file ../../babel.config.js",
"docs": "doc-component ./lib/index.js ./README.md"

@@ -19,0 +19,0 @@ },

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

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