diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcd6c17..57d8fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/spec/pagination/pagination.interceptor.spec.ts b/spec/pagination/pagination.interceptor.spec.ts index 527655a..3ef7cf7 100644 --- a/spec/pagination/pagination.interceptor.spec.ts +++ b/spec/pagination/pagination.interceptor.spec.ts @@ -8,6 +8,7 @@ import { PaginationType } from '../../src'; import { BaseService } from '../base/base.service'; import { TestHelper } from '../test.helper'; +const TEST_LISTEN_PORT = 3339; describe('Pagination with interceptor', () => { const defaultLimit = 20; describe('with ReadMany Interceptor', () => { @@ -37,6 +38,8 @@ describe('Pagination with interceptor', () => { const service: BaseService = moduleFixture.get(BaseService); await service.repository.save(Array.from({ length: 100 }, (_, index) => index).map((number) => ({ name: `name-${number}` }))); await app.init(); + // FIXME: There is a problem that read ECONNRESET error occurs in node20 + await app.listen(TEST_LISTEN_PORT); }); afterAll(async () => { diff --git a/spec/pagination/pagination.spec.ts b/spec/pagination/pagination.spec.ts index c2b96be..0c200d9 100644 --- a/spec/pagination/pagination.spec.ts +++ b/spec/pagination/pagination.spec.ts @@ -7,6 +7,7 @@ import { PaginationType } from '../../src'; import { BaseService } from '../base/base.service'; import { TestHelper } from '../test.helper'; +const TEST_LISTEN_PORT = 3339; describe('Pagination', () => { let app: INestApplication; let service: BaseService; @@ -30,6 +31,8 @@ describe('Pagination', () => { service = moduleFixture.get(BaseService); await app.init(); + // FIXME: There is a problem that read ECONNRESET error occurs in node20 + await app.listen(TEST_LISTEN_PORT); }); beforeEach(async () => { diff --git a/spec/pgsql/pgsql.spec.ts b/spec/pgsql/pgsql.spec.ts index 5e61966..89bc51d 100644 --- a/spec/pgsql/pgsql.spec.ts +++ b/spec/pgsql/pgsql.spec.ts @@ -56,6 +56,8 @@ class TestController implements CrudController { }) class TestModule {} +const TEST_LISTEN_PORT = 3339; + describe('Search complex conditions', () => { let app: INestApplication; @@ -65,6 +67,8 @@ describe('Search complex conditions', () => { }).compile(); app = moduleFixture.createNestApplication(); await app.init(); + // FIXME: There is a problem that read ECONNRESET error occurs in node20 + await app.listen(TEST_LISTEN_PORT); await Promise.all( [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((no) => diff --git a/spec/search/search-complex-condition.spec.ts b/spec/search/search-complex-condition.spec.ts index f2f053c..de361c6 100644 --- a/spec/search/search-complex-condition.spec.ts +++ b/spec/search/search-complex-condition.spec.ts @@ -1,6 +1,5 @@ /* eslint-disable max-classes-per-file */ -import { HttpStatus, INestApplication } from '@nestjs/common'; -import { Controller, Injectable, Module } from '@nestjs/common'; +import { Controller, Injectable, Module, HttpStatus, INestApplication } from '@nestjs/common'; import { Test, TestingModule } from '@nestjs/testing'; import { InjectRepository, TypeOrmModule } from '@nestjs/typeorm'; import { IsOptional } from 'class-validator'; @@ -47,6 +46,7 @@ class TestController implements CrudController { }) class TestModule {} +const TEST_LISTEN_PORT = 3339; describe('Search complex conditions', () => { let app: INestApplication; @@ -56,6 +56,8 @@ describe('Search complex conditions', () => { }).compile(); app = moduleFixture.createNestApplication(); await app.init(); + // FIXME: There is a problem that read ECONNRESET error occurs in node20 + await app.listen(TEST_LISTEN_PORT); await Promise.all( Array.from({ length: 10 }, (_, index) => index).map((no) => diff --git a/spec/sub-path/sub-path-more-than-one-parent.spec.ts b/spec/sub-path/sub-path-more-than-one-parent.spec.ts index 23aa07a..4c9c7a6 100644 --- a/spec/sub-path/sub-path-more-than-one-parent.spec.ts +++ b/spec/sub-path/sub-path-more-than-one-parent.spec.ts @@ -5,6 +5,7 @@ import request from 'supertest'; import { SubPathModule } from './sub-path.module'; import { TestHelper } from '../test.helper'; +const TEST_LISTEN_PORT = 3339; describe('Subpath - more then one parent parameter', () => { let app: INestApplication; @@ -14,6 +15,8 @@ describe('Subpath - more then one parent parameter', () => { }).compile(); app = moduleFixture.createNestApplication(); await app.init(); + // FIXME: There is a problem that read ECONNRESET error occurs in node20 + await app.listen(TEST_LISTEN_PORT); /** * | parentId | subId | name | diff --git a/spec/sub-path/sub-path-one-parent.spec.ts b/spec/sub-path/sub-path-one-parent.spec.ts index 624dfe7..511b163 100644 --- a/spec/sub-path/sub-path-one-parent.spec.ts +++ b/spec/sub-path/sub-path-one-parent.spec.ts @@ -6,6 +6,7 @@ import { DepthOneEntity } from './depth-one.entity'; import { SubPathModule } from './sub-path.module'; import { TestHelper } from '../test.helper'; +const TEST_LISTEN_PORT = 3339; describe('Subpath - one parent parameter', () => { let app: INestApplication; @@ -15,6 +16,8 @@ describe('Subpath - one parent parameter', () => { }).compile(); app = moduleFixture.createNestApplication(); await app.init(); + // FIXME: There is a problem that read ECONNRESET error occurs in node20 + await app.listen(TEST_LISTEN_PORT); }); beforeEach(async () => {