Browse Source

refactor/Minor refactor

pull/3358/head
Muhammed Mustafa 2 years ago
parent
commit
384de141dc
  1. 1
      packages/nocodb/src/__tests__/unit/rest/init/cleanupMeta.ts
  2. 2
      packages/nocodb/src/__tests__/unit/rest/init/index.ts
  3. 2
      packages/nocodb/src/__tests__/unit/rest/tests/auth.test.ts
  4. 0
      packages/nocodb/src/__tests__/unit/rest/tests/factory/column.ts
  5. 0
      packages/nocodb/src/__tests__/unit/rest/tests/factory/project.ts
  6. 0
      packages/nocodb/src/__tests__/unit/rest/tests/factory/row.ts
  7. 0
      packages/nocodb/src/__tests__/unit/rest/tests/factory/table.ts
  8. 0
      packages/nocodb/src/__tests__/unit/rest/tests/factory/user.ts
  9. 2
      packages/nocodb/src/__tests__/unit/rest/tests/project.test.ts
  10. 6
      packages/nocodb/src/__tests__/unit/rest/tests/table.test.ts
  11. 4
      packages/nocodb/src/__tests__/unit/rest/tests/tableRow.test.ts

1
packages/nocodb/src/__tests__/unit/rest/init/cleanupMeta.ts

@ -1,4 +1,3 @@
import Base from '../../../../lib/models/Base';
import Model from '../../../../lib/models/Model';
import Project from '../../../../lib/models/Project';
import NcConnectionMgrv2 from '../../../../lib/utils/common/NcConnectionMgrv2';

2
packages/nocodb/src/__tests__/unit/rest/init/index.ts

@ -3,7 +3,7 @@ import { Noco } from '../../../../lib';
import express from 'express';
import cleanupMeta from './cleanupMeta';
import cleanUpSakila from './cleanupSakila';
import { createUser } from '../tests/helpers/user';
import { createUser } from '../tests/factory/user';
import knex from 'knex';
const knexClient = knex(dbConfig);

2
packages/nocodb/src/__tests__/unit/rest/tests/auth.test.ts

@ -2,7 +2,7 @@ import { expect } from 'chai';
import 'mocha';
import request from 'supertest';
import init from '../init';
import { defaultUserArgs } from './helpers/user';
import { defaultUserArgs } from './factory/user';
function authTests() {
let context;

0
packages/nocodb/src/__tests__/unit/rest/tests/helpers/column.ts → packages/nocodb/src/__tests__/unit/rest/tests/factory/column.ts

0
packages/nocodb/src/__tests__/unit/rest/tests/helpers/project.ts → packages/nocodb/src/__tests__/unit/rest/tests/factory/project.ts

0
packages/nocodb/src/__tests__/unit/rest/tests/helpers/row.ts → packages/nocodb/src/__tests__/unit/rest/tests/factory/row.ts

0
packages/nocodb/src/__tests__/unit/rest/tests/helpers/table.ts → packages/nocodb/src/__tests__/unit/rest/tests/factory/table.ts

0
packages/nocodb/src/__tests__/unit/rest/tests/helpers/user.ts → packages/nocodb/src/__tests__/unit/rest/tests/factory/user.ts

2
packages/nocodb/src/__tests__/unit/rest/tests/project.test.ts

@ -1,7 +1,7 @@
import 'mocha';
import request from 'supertest';
import Project from '../../../../lib/models/Project';
import { createProject, createSharedBase } from './helpers/project';
import { createProject, createSharedBase } from './factory/project';
import { beforeEach } from 'mocha';
import { Exception } from 'handlebars';
import init from '../init/index';

6
packages/nocodb/src/__tests__/unit/rest/tests/table.test.ts

@ -1,10 +1,10 @@
// import { expect } from 'chai';
import 'mocha';
import request from 'supertest';
import { createTable } from './helpers/table';
import { createProject } from './helpers/project';
import { createTable } from './factory/table';
import { createProject } from './factory/project';
import Model from '../../../../lib/models/Model';
import { defaultColumns } from './helpers/column';
import { defaultColumns } from './factory/column';
import init from '../init';
function tableTest() {

4
packages/nocodb/src/__tests__/unit/rest/tests/tableRow.test.ts

@ -1,5 +1,5 @@
import 'mocha';
import { createSakilaProject } from './helpers/project';
import { createSakilaProject } from './factory/project';
import Model from '../../../../lib/models/Model';
import init from '../init';
import request from 'supertest';
@ -8,7 +8,7 @@ import {
createColumn,
createLookupColumn,
createRollupColumn,
} from './helpers/column';
} from './factory/column';
const isColumnsCorrectInResponse = (response, columns: ColumnType[]) => {
const responseColumnsListStr = Object.keys(response.body.list[0])

Loading…
Cancel
Save