Skip to content

Instantly share code, notes, and snippets.

RUNS tests/unit/test_sriDataPlugin.js
FAIL tests/unit/test_sriDataPlugin.js
● Console
console.warn node_modules/bluebird/js/release/debuggability.js:888
Unhandled rejection TypeError: setTimeout(...).unref is not a function
at Farm.Object.<anonymous>.Farm.stopChild (/Users/bsilverberg/Documents/gitRepos/addons-frontend/node_modules/worker-farm/lib/farm.js:135:37)
at Farm.<anonymous> (/Users/bsilverberg/Documents/gitRepos/addons-frontend/node_modules/worker-farm/lib/farm.js:324:12)
at Array.forEach (<anonymous>)
Error ------------------------------------------------------------------------------- src/core/reducers/addons.js:236:22
Cannot assign object literal to addon because:
- property license is missing in PartialExternalAddonVersionType [1] but exists in ExternalAddonVersionType [2] in
property current_version.
- property release_notes is missing in PartialExternalAddonVersionType [1] but exists in ExternalAddonVersionType [2]
in property current_version.
src/core/reducers/addons.js
227| export function createInternalAddon(
● /Users/bsilverberg/Documents/gitRepos/addons-frontend/tests/unit/amo/components/TestAddonReviewCard.js › byLine › renders a byLine with an author by default
Invariant Violation: Could not find "store" in either the context or props of "Connect(LinkBase)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(LinkBase)".
934 | describe('byLine', () => {
935 | function renderByLine(root) {
> 936 | return shallow(root.find(UserReview).prop('byLine'));
| ^
937 | }
938 |
diff --git a/src/amo/components/AddonReviewCard/index.js b/src/amo/components/AddonReviewCard/index.js
index 4b62821..043a06d 100644
--- a/src/amo/components/AddonReviewCard/index.js
+++ b/src/amo/components/AddonReviewCard/index.js
@@ -9,6 +9,7 @@ import { compose } from 'redux';
import AddonReview from 'amo/components/AddonReview';
import AddonReviewManager from 'amo/components/AddonReviewManager';
import FlagReviewMenu from 'amo/components/FlagReviewMenu';
+import Link from 'amo/components/Link';
import { ADDONS_EDIT } from 'core/constants';
diff --git a/src/amo/sagas/reviews.js b/src/amo/sagas/reviews.js
index c777a8e..ae7ab5b 100644
--- a/src/amo/sagas/reviews.js
+++ b/src/amo/sagas/reviews.js
@@ -297,7 +297,10 @@ function* deleteAddonReview({
reviewId,
});
- yield put(unloadAddonReviews({ reviewId: isReplyToReviewId || reviewId }));
+ yield put(unloadAddonReviews({ reviewId }));
Cannot assign undefined to newState.byUserId[userId] because inexact undefined [1] is incompatible with exact
StoredReviewsData [2].
src/amo/reducers/reviews.js
[2] 64│ [userId: number]: StoredReviewsData,
:
473│
474│ delete newState.byId[reviewId];
475│ newState.byAddon[addonSlug] = undefined;
476│ newState.byUserId[userId] = undefined;
case CLEAR_ADDON_REVIEWS_FOR_REVIEWID: {
const {
payload: { reviewId },
} = action;
const newState = { ...state };
const reviewData = state.byId[reviewId];
if (reviewData) {
const { addonId, addonSlug, userId } = reviewData;
diff --git a/src/ui/components/MetadataCard/index.js b/src/ui/components/MetadataCard/index.js
index 6575558..1ece55e 100644
--- a/src/ui/components/MetadataCard/index.js
+++ b/src/ui/components/MetadataCard/index.js
@@ -17,7 +17,7 @@ const MetadataCard = ({ className, metadata }: Props) => {
return (
<div className={makeClassName('MetadataCard', className)}>
- {metadata.map(({ content, title } = {}) => {
+ {metadata.map(({ content, title } = {}, index) => {
diff --git a/src/amo/components/Home/index.js b/src/amo/components/Home/index.js
index d18de27..caf3e57 100644
--- a/src/amo/components/Home/index.js
+++ b/src/amo/components/Home/index.js
@@ -6,6 +6,7 @@ import { compose } from 'redux';
import { setViewContext } from 'amo/actions/viewContext';
import CategoryIcon from 'amo/components/CategoryIcon';
+import FeaturedCollectionCard from 'amo/components/FeaturedCollectionCard';
import HomeHeroBanner from 'amo/components/HomeHeroBanner';
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ src/amo/components/AddonsCard/index.js:19:18
Property notes is missing in AddonType [1] but exists in CollectionAddonType [2].
16│
17│ type Props = {|
18│ addonInstallSource?: string,
[1][2] 19│ addons?: Array<AddonType> | Array<CollectionAddonType> | null,
20│ children?: React.Node,
21│ className?: string,