@govuk-react/error-text
Advanced tools
Comparing version 0.9.0 to 0.9.1
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15391
17
205
Updated@govuk-react/lib@^0.9.1