diff --git a/README.md b/README.md index ecfa2f0b00..7fe2bcaac8 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The Graph Explorer is written in [TypeScript](https://www.typescriptlang.org/) a #### Enabling authentication with your own credentials * Sign in to your Microsoft account (or Create one) at the [Microsoft Azure Portal](https://ms.portal.azure.com/). -* Find the Azure service named App registrations. If you haven't used this service before, you might need to search for it in the search bar. +* Find the Azure service named App registrations. If you haven't used this service before, you might need to search for it in the search bar. * In the App registrations page, click `+ New registration`. You will be redirected to a form in the Microsoft Azure portal where you Register an application. Fill out the form and set the Redirect URI to a `Single-page application (SPA)` with `http://localhost:3000`. You can also set it from authentication tab in the app you have just created. * Create a `.env` file at the root of the project/repo and add the following keys. - REACT_APP_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/jest.config.js b/jest.config.js index dd4a353363..cb8b6b0c92 100644 --- a/jest.config.js +++ b/jest.config.js @@ -18,7 +18,10 @@ module.exports = { '**/?(*.)+(spec|test).[jt]s' ], globals: { - crypto: require('crypto') + crypto: require('crypto'), + 'ts-jest': { + isolatedModules: true + } }, testEnvironmentOptions: { url: 'http://localhost' diff --git a/package-lock.json b/package-lock.json index 8e5c05aea3..f9ac968b77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3758,19 +3758,6 @@ "dev": true, "requires": { "@types/react": "*" - }, - "dependencies": { - "@types/react": { - "version": "17.0.30", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.30.tgz", - "integrity": "sha512-3Dt/A8gd3TCXi2aRe84y7cK1K8G+N9CZRDG8kDGguOKa0kf/ZkSwTmVIDPsm/KbQOVMaDJXwhBtuOXxqwdpWVg==", - "dev": true, - "requires": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - } } } } @@ -5364,7 +5351,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "at-least-node": { @@ -12923,7 +12910,7 @@ "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", "dev": true }, "magic-string": { @@ -16921,4 +16908,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 8e7a97e854..2811921a0e 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "scripts": { "start": "node scripts/start.js", "build": "node scripts/build.js && node versioned-build.js", - "test": "node scripts/test.js --no-watch --testPathIgnorePatterns=src/tests/accessibility /scripts/", + "test": "node scripts/test.js --no-watch --testPathIgnorePatterns=src/tests/accessibility /scripts/ --max-old-space-size=8192", "lint": "eslint . \"**/*.{js,ts,tsx}\"", "start-server": "npm start", "ci": "start-server-and-test start-server http://localhost:3000 test-ci", diff --git a/src/app/services/actions/autocomplete-action-creators.spec.ts b/src/app/services/actions/autocomplete-action-creators.spec.ts index b41607f915..f74d33dc71 100644 --- a/src/app/services/actions/autocomplete-action-creators.spec.ts +++ b/src/app/services/actions/autocomplete-action-creators.spec.ts @@ -120,7 +120,7 @@ store.getState = () => { ...currentState } } -describe.skip('Test autocomplete action creators', () => { +describe('Test autocomplete action creators', () => { beforeEach(() => { // eslint-disable-next-line no-undef fetchMock.resetMocks(); diff --git a/src/app/services/actions/permissions-action-creator.spec.ts b/src/app/services/actions/permissions-action-creator.spec.ts index a6965e9244..884cf97834 100644 --- a/src/app/services/actions/permissions-action-creator.spec.ts +++ b/src/app/services/actions/permissions-action-creator.spec.ts @@ -124,7 +124,7 @@ store.getState = () => { } } -describe.skip('tests permissions action creators', () => { +describe('tests permissions action creators', () => { it('Tests if FETCH_SCOPES_SUCCESS is dispatched when fetchScopesSuccess is called', () => { // Arrange const response: IPermissionsResponse = { diff --git a/src/app/services/actions/query-action-creators.spec.ts b/src/app/services/actions/query-action-creators.spec.ts index 0592505d50..6e300bd835 100644 --- a/src/app/services/actions/query-action-creators.spec.ts +++ b/src/app/services/actions/query-action-creators.spec.ts @@ -8,7 +8,7 @@ import { QUERY_GRAPH_RUNNING, QUERY_GRAPH_STATUS, QUERY_GRAPH_SUCCESS } from '.. const middlewares = [thunk]; const mockStore = configureMockStore(middlewares); -describe.skip('query actions', () => { +describe('query actions', () => { beforeEach(() => { fetchMock.resetMocks(); }); diff --git a/src/app/services/reducers/resources-reducer.spec.ts b/src/app/services/reducers/resources-reducer.spec.ts index e686b44c3f..e840858c2d 100644 --- a/src/app/services/reducers/resources-reducer.spec.ts +++ b/src/app/services/reducers/resources-reducer.spec.ts @@ -80,7 +80,7 @@ describe('Resources Reducer', () => { expect(state).toEqual(newState); }); - it.skip('should handle FETCH_RESOURCES_ERROR', () => { + it('should handle FETCH_RESOURCES_ERROR', () => { const mockResponse = new Error('400'); diff --git a/src/tests/proxy-url.spec.ts b/src/tests/proxy-url.spec.ts index 37eec7d7fe..b8817ab0fe 100644 --- a/src/tests/proxy-url.spec.ts +++ b/src/tests/proxy-url.spec.ts @@ -6,7 +6,7 @@ import { isValidHttpsUrl } from '../app/utils/external-link-validation'; import { IQuery } from '../types/query-runner'; import { IStatus } from '../types/status'; -describe.skip('Sandbox api fetch should', () => { +describe('Sandbox api fetch should', () => { test('return valid url', async () => { const res = await fetch(GRAPH_API_SANDBOX_ENDPOINT_URL);