Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Remove redundant memoisation #1456

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/src/boot/tests/BootRoutes-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, afterEach, it, expect, window */
/* global jest, describe, afterEach, it, expect, window */

jest.unmock('../BootRoutes.js');
jest.unmock('lib/Config');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, it, expect, beforeEach */
/* global jest, describe, it, expect, beforeEach */

import Adapter from 'enzyme-adapter-react-16';

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Search/tests/Search-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, it, expect, beforeEach */
/* global jest, describe, it, expect, beforeEach */

// FormBuilderLoader mock was not mocking properly
// manually override with a stateless null component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, it, expect, beforeEach */
/* global jest, describe, it, expect, beforeEach */
import defaultTagHandlers from '../utilities/defaultTagHandlers';

const formSchema = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, it, expect, beforeEach */
/* global jest, describe, it, expect, beforeEach */
import mapFormSchemaToTags from '../utilities/mapFormSchemaToTags';

const formSchema = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ import { CacheProvider } from '@emotion/react';
*/
function EmotionCssCacheProvider({ children }) {
if (!window.ssReactSelectCache) {
window.ssReactSelectCache = React.useMemo(
() => createCache({
key: 'react-select',
insertionPoint: document.querySelector('title'),
}),
[]
);
window.ssReactSelectCache = createCache({
key: 'react-select',
insertionPoint: document.querySelector('title'),
});
}

return <CacheProvider value={window.ssReactSelectCache}>{children}</CacheProvider>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, it, expect, beforeEach */
/* global jest, describe, it, expect, beforeEach */

jest.mock('components/FormBuilderModal/FormBuilderModal');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import ApolloGraphqlManager from '../ApolloGraphqlManager';
import { getFields } from '../graphql/helpers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import ApolloGraphqlProxy from '../ApolloGraphqlProxy';
import gql from 'graphql-tag';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */
import buildInjectorContainer from '../buildInjectorContainer';
import buildApolloGraphqlScaffoldingContainer from '../buildApolloGraphqlScaffoldingContainer';
import * as graphqlTemplates from '../graphql/templates';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import buildBaseContainer from '../buildBaseContainer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */
import buildComponentContainer from '../buildComponentContainer';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

jest.mock('../buildInjectorContainer',
() => () => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */
import
buildFormContainer,
{ SCHEMA_MIDDLEWARE_SERVICE, VALIDATION_MIDDLEWARE_SERVICE }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

jest.mock('redux-form', () => ({
isDirty: (name, getFormState) => (state) => getFormState(state)[name].dirty,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import FormValidationManager from '../FormValidationManager';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import buildInjectorContainer from '../buildInjectorContainer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import MiddlewareRegistry from '../MiddlewareRegistry';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

jest.mock('../MiddlewareRegistry', () => jest.fn().mockImplementation(() => ({ add: () => {} })));
import buildReducerContainer from '../buildReducerContainer';
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/dependency-injection/tests/inject-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */

import React, { Component } from 'react';
import ReactTestUtils from 'react-dom/test-utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */
/* eslint-disable react/no-multi-comp */

import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/tests/Backend-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */


jest.unmock('isomorphic-fetch');
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/tests/DataFormat-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */


jest.unmock('isomorphic-fetch');
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/tests/ReactRouteRegister-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, afterEach, it, expect */
/* global jest, describe, afterEach, it, expect */

jest.unmock('deep-freeze-strict');
jest.unmock('../ReactRouteRegister.js');
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/tests/ShortcodeSerialiser-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */
/* global jest, describe, beforeEach, it, pit, expect, process */
import ShortcodeSerialiser from '../ShortcodeSerialiser';

describe('ShortcodeSerialiser', () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/tests/TinyMCEActionRegistrar-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, afterEach, it, expect */
/* global jest, describe, afterEach, it, expect */

jest.unmock('../TinyMCEActionRegistrar.js');

Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/tests/router-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global jest, jasmine, describe, beforeEach, it, expect, process */
/* global jest, describe, beforeEach, it, expect, process */
import router from '../Router';

describe('Router', () => {
Expand Down