Skip to content

Commit

Permalink
Speed up tests (#1840)
Browse files Browse the repository at this point in the history
  • Loading branch information
Onokaev authored Jun 15, 2022
1 parent 2e04d51 commit b350f74
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
19 changes: 3 additions & 16 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/actions/query-action-creators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/reducers/resources-reducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion src/tests/proxy-url.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b350f74

Please sign in to comment.