Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Leshchev committed Sep 29, 2023
1 parent 31ae647 commit ab116cc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 35 deletions.
22 changes: 0 additions & 22 deletions .vscode/settings.json

This file was deleted.

8 changes: 4 additions & 4 deletions __tests__/models/method-parameter/MethodModel.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { MockOpenAPIService } from '../../../__mocks__/MockOpenAPIService';
import { ParameterPlace } from '../../../src/models/kinds/ParameterPlace';
import { IQueryParameter } from '../../../src/models/method-parameter/IQueryParameter';
import { PathMethodParameterModel } from '../../../src/models/method-parameter/PathMethodParameterModel';
import { QueryMethodParameterModel } from '../../../src/models/method-parameter/QueryMethodParameterModel';
import { defaultOptions } from '../../../src/options';
import { TypesService } from '../../../src/services/TypesService';
import { OpenAPIService } from '../../../src/swagger/OpenAPIService';
import { OpenAPITypesGuard } from '../../../src/swagger/OpenAPITypesGuard';
import { IOpenAPI3Parameter } from '../../../src/swagger/v3/parameter';
import { OpenAPIService } from '../../../src/swagger/OpenAPIService';
import { MockOpenAPIService } from '../../../__mocks__/MockOpenAPIService';

describe('MethodParameterModel tests', () => {
let typesGuard: OpenAPITypesGuard;
Expand All @@ -15,7 +15,7 @@ describe('MethodParameterModel tests', () => {

beforeEach(() => {
typesGuard = new OpenAPITypesGuard();
typesService = new TypesService(typesGuard);
typesService = new TypesService(typesGuard, defaultOptions);
openAPIService = new MockOpenAPIService(typesGuard);
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { MockOpenAPIService } from '../../../__mocks__/MockOpenAPIService';
import { ParameterPlace } from '../../../src/models/kinds/ParameterPlace';
import { MethodParameterModelBase } from '../../../src/models/method-parameter/MethodParameterModelBase';
import { defaultOptions } from '../../../src/options';
import { TypesService } from '../../../src/services/TypesService';
import { OpenAPIService } from '../../../src/swagger/OpenAPIService';
import { OpenAPITypesGuard } from '../../../src/swagger/OpenAPITypesGuard';
import { IOpenAPI3Parameter } from '../../../src/swagger/v3/parameter';
import { OpenAPIService } from '../../../src/swagger/OpenAPIService';
import { MockOpenAPIService } from '../../../__mocks__/MockOpenAPIService';
import { MethodParameterModelBase } from '../../../src/models/method-parameter/MethodParameterModelBase';
import { IOpenAPI3EnumSchema } from '../../../src/swagger/v3/schemas/enum-schema';

describe('MethodParameterModelBase tests', () => {
Expand All @@ -18,7 +19,7 @@ describe('MethodParameterModelBase tests', () => {

beforeEach(() => {
typesGuard = new OpenAPITypesGuard();
typesService = new TypesService(typesGuard);
typesService = new TypesService(typesGuard, defaultOptions);
openAPIService = new MockOpenAPIService(typesGuard);
});

Expand Down
5 changes: 3 additions & 2 deletions __tests__/services/ModelMappingService.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MockOpenAPIService } from '../../__mocks__/MockOpenAPIService';
import { defaultOptions } from '../../src/options';
import { ModelMappingService } from '../../src/services/ModelMappingService';
import { TypesService } from '../../src/services/TypesService';
import { OpenAPITypesGuard } from '../../src/swagger/OpenAPITypesGuard';
Expand All @@ -11,7 +12,7 @@ describe('ModelMappingService tests', () => {
beforeEach(() => {
const guard = new OpenAPITypesGuard();
const openAPIService = new MockOpenAPIService(guard);
service = new ModelMappingService(openAPIService, guard, new TypesService(guard));
service = new ModelMappingService(openAPIService, guard, new TypesService(guard, defaultOptions));
});

describe('toModelsContainer', () => {
Expand All @@ -38,4 +39,4 @@ describe('ModelMappingService tests', () => {
});
});
});
});
});
4 changes: 2 additions & 2 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
@@ -1,6 +1,6 @@
{
"name": "@luxbss/gengen",
"version": "1.0.0-rc.13",
"version": "1.0.0",
"description": "Tool for generating models and Angular services based on OpenAPIs and Swagger's JSON",
"bin": {
"gengen": "./bin/index.js"
Expand Down

0 comments on commit ab116cc

Please sign in to comment.