Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Clear unit test warnings #1518

Merged
merged 3 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/psammead-brand/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
| ------- | ----------- |
| 4.2.2 | [PR#1518](https://github.com/bbc/psammead/pull/1518) Clear unit test warnings |
| 4.2.1 | [PR#1365](https://github.com/bbc/psammead/pull/1365) Bump psammead-styles to 1.2.0 |
| 4.2.0 | [PR#1233](https://github.com/bbc/psammead/pull/1233) Add ESM modules entry |
| 4.1.12 | [PR#1181](https://github.com/bbc/psammead/pull/1181) Bump dependencies |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-brand/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/psammead-brand/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-brand",
"version": "4.2.1",
"version": "4.2.2",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ exports[`Brand should render correctly with link not provided 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<g
fillrule="evenodd"
fill-rule="evenodd"
>
<path
d="M84.32"
Expand Down Expand Up @@ -192,7 +192,7 @@ exports[`Brand should render correctly with link provided 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<g
fillrule="evenodd"
fill-rule="evenodd"
>
<path
d="M84.32"
Expand Down Expand Up @@ -295,7 +295,7 @@ exports[`Brand should render correctly with no service Localised Name 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<g
fillrule="evenodd"
fill-rule="evenodd"
>
<path
d="M84.32"
Expand Down Expand Up @@ -392,7 +392,7 @@ exports[`Brand should render correctly with transparent borders 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<g
fillrule="evenodd"
fill-rule="evenodd"
>
<path
d="M84.32"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-brand/src/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Brand from './index';

const svg = {
group: (
<g fillrule="evenodd">
<g fillRule="evenodd">
<path d="M84.32" />
</g>
),
Expand Down
1 change: 1 addition & 0 deletions packages/components/psammead-image/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 1.1.1 | [PR#1518](https://github.com/bbc/psammead/pull/1518) Clear unit test warnings |
| 1.1.0 | [PR#1233](https://github.com/bbc/psammead/pull/1233) Add ESM modules entry |
| 1.0.6 | [PR#1180](https://github.com/bbc/psammead/pull/1180) use `psammead-assets@1.0.6` and `psammead-test-helpers@1.0.2`|
| 1.0.5 | [PR#1082](https://github.com/bbc/psammead/pull/1082) Bump lodash security vulnerability |
Expand Down
2 changes: 1 addition & 1 deletion packages/components/psammead-image/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/psammead-image/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-image",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exports[`Image - AmpImg should render image with srcset correctly 1`] = `
alt="Student sitting an exam"
attribution=""
height="576"
layout="responsive"
sizes="100vw"
src="https://ichef.bbci.co.uk/news/300/cpsprodpb/7098/production/_104842882_students.jpg"
srcset="https://ichef.bbci.co.uk/news/300/cpsprodpb/7098/production/_104842882_students.jpg 300w, https://ichef.bbci.co.uk/news/450/cpsprodpb/7098/production/_104842882_students.jpg 450w, https://ichef.bbci.co.uk/news/600/cpsprodpb/7098/production/_104842882_students.jpg 600w, https://ichef.bbci.co.uk/news/1024/cpsprodpb/7098/production/_104842882_students.jpg 1024w"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const snapshotTests = (Component, additionalProps) => {
srcset={landscape.srcset}
height={landscape.height}
width={landscape.width}
{...additionalProps}
/>,
);
};
Expand Down
1 change: 1 addition & 0 deletions packages/components/psammead-sitewide-links/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 2.2.1 | [PR#1518](https://github.com/bbc/psammead/pull/1518) Clear unit test warnings |
| 2.2.0 | [PR#1408](https://github.com/bbc/psammead/pull/1408) Use `@bbc/psammead-styles/detection` to detect grid support |
| 2.1.1 | [PR#1362](https://github.com/bbc/psammead/pull/1362) Use `text-decoration` styling instead of border-bottom |
| 2.1.0 | [PR#1233](https://github.com/bbc/psammead/pull/1233) Add ESM modules entry |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/psammead-sitewide-links/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-sitewide-links",
"version": "2.2.0",
"version": "2.2.1",
"description": "React styled component for a sitewide-links",
"main": "dist/index.js",
"module": "esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link0
</span>
</a>
</li>
Expand All @@ -121,7 +121,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link1
</span>
</a>
</li>
Expand All @@ -136,7 +136,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link2
</span>
</a>
</li>
Expand All @@ -151,7 +151,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link3
</span>
</a>
</li>
Expand All @@ -166,7 +166,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link4
</span>
</a>
</li>
Expand All @@ -181,7 +181,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link5
</span>
</a>
</li>
Expand All @@ -196,7 +196,7 @@ exports[`List should render correctly with 7 items 1`] = `
<span
class="c4"
>
Link
Link6
</span>
</a>
</li>
Expand Down Expand Up @@ -309,7 +309,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link0
</span>
</a>
</li>
Expand All @@ -324,7 +324,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link1
</span>
</a>
</li>
Expand All @@ -339,7 +339,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link2
</span>
</a>
</li>
Expand All @@ -354,7 +354,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link3
</span>
</a>
</li>
Expand All @@ -369,7 +369,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link4
</span>
</a>
</li>
Expand All @@ -384,7 +384,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link5
</span>
</a>
</li>
Expand All @@ -399,7 +399,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link6
</span>
</a>
</li>
Expand All @@ -414,7 +414,7 @@ exports[`List should render correctly with 8 items 1`] = `
<span
class="c4"
>
Link
Link7
</span>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ describe(`List`, () => {
text: 'Link',
};

const getLinks = count => new Array(count).fill(link);
const getLinks = count =>
new Array(count).fill(link).map((linkItem, index) => ({
...linkItem,
text: `${linkItem.text}${index}`,
}));

shouldMatchSnapshot(
'should render correctly with 7 items',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link0
</span>
</a>
</li>
Expand All @@ -180,7 +180,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link1
</span>
</a>
</li>
Expand All @@ -195,7 +195,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link2
</span>
</a>
</li>
Expand All @@ -210,7 +210,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link3
</span>
</a>
</li>
Expand All @@ -225,7 +225,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link4
</span>
</a>
</li>
Expand All @@ -240,7 +240,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link5
</span>
</a>
</li>
Expand All @@ -255,7 +255,7 @@ exports[`SitewideLinks should render correctly 1`] = `
<span
class="c6"
>
Link
Link6
</span>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ describe(`SitewideLinks`, () => {
text: 'Link',
};

const links = new Array(7).fill(link);
const links = new Array(7).fill(link).map((linkItem, index) => ({
...linkItem,
text: `${linkItem.text}${index}`,
}));

shouldMatchSnapshot(
'should render correctly',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|
| 2.2.2 | [PR#1518](https://github.com/bbc/psammead/pull/1518) Clear unit test warnings |
| 2.2.1 | [PR#1352](https://github.com/bbc/psammead/pull/1352) Update default timestamp format |
| 2.2.0 | [PR#1245](https://github.com/bbc/psammead/pull/1245) The storybook stories now include the ability to change the service |
| 2.1.0 | [PR#1233](https://github.com/bbc/psammead/pull/1233) Add ESM modules entry |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bbc/psammead-timestamp-container",
"version": "2.2.1",
"version": "2.2.2",
"main": "dist/index.js",
"module": "esm/index.js",
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const invalidData = '8640000000000001'; // A day holds 86,400,000 milliseconds -

describe('Timestamp', () => {
describe('with no data', () => {
console.error = jest.fn(); // eslint-disable-line no-console
isNull('should return null', <Timestamp />);
});

Expand Down