graphql-engine/console/jest.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
990 B
JavaScript
Raw Normal View History

module.exports = {
roots: ['<rootDir>/src'],
transform: {
'^.+\\.(ts|tsx|js|jsx)?$': 'ts-jest',
'^.+\\.svg$': 'jest-svg-transformer',
},
console: add citus support ### Description Add console support for Citus DB ### Changelist - [x] Add/Remove Citus Datasource - [x] Track/Untrack tables - [x] Create Relationships + Tracking suggested relationships - [x] Permissions - [x] Browse Rows (minimal) - [x] Insert Row (using Mutations) - [x] Filtering Shards and Partitions (partition details are not present in Modify tab, it should work once https://github.com/hasura/graphql-engine-mono/pull/1164 is merged) - [x] Create Table - [x] Fixes issue https://github.com/hasura/graphql-engine/issues/6926 for Citus. ### Known Issues - Unable to create Functions from Raw SQL, server returns 400. - Unable to run `ALTER` SQL commands, server returns 400. ### Screenshots ![Screenshot 2021-04-21 at 7 53 23 PM](https://user-images.githubusercontent.com/11921040/115569900-468b3d80-a2db-11eb-8374-e06d5d61b2e4.png) ### Setting up a Citus Source - Link to [docker compose](https://github.com/citusdata/docker/blob/master/docker-compose.yml) - Create an `.envfile` and add the following ```env COORDINATOR_EXTERNAL_PORT=<port to expose citus master> COMPOSE_PROJECT_NAME=test ``` - run `docker-compose --file docker-compose.yml --env-file .envfile up --scale worker=2 -d`. `worker` controls the number of citus worker nodes. - Link to [sample data](http://docs.citusdata.com/en/v10.0/get_started/tutorial_multi_tenant.html#data-model-and-sample-data) ### Changelog - [x] console: add citus support https://github.com/hasura/graphql-engine-mono/pull/1184 Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com> GitOrigin-RevId: 2500a5d5f996a2904fe8b5c656d6f3f2db707db6
2021-06-21 09:46:29 +03:00
testRegex: '(/__tests__/.*)\\.(test|spec).[jt]sx?$',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleDirectories: ['node_modules', 'src'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
__DEV__: true,
CONSOLE_ASSET_VERSION: Date.now().toString(),
'process.hrtime': () => null,
__DEVELOPMENT__: true,
__CLIENT__: true,
__SERVER__: true,
__DISABLE_SSR__: true,
__DEVTOOLS__: true,
socket: true,
webpackIsomorphicTools: true,
window: {
__env: {
nodeEnv: 'development',
serverVersion: 'v1.0.0',
},
},
},
};