You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a Rule that enforces closing a TestingModule. When we create a module in tests and don't close it we potentially leak memory and/or database connections.
Acceptance Criteria
The ESLint rule should warn when:
A Test.createTestingModule() is executed in the beforeEach() hook, but then the module isn’t closed in the afterEach()
A Test.createTestingModule() is executed in the beforeAll() hook, but isn’t closed in the afterAll() one.
A Test.createTestingModule() is executed within a test, or it block, but isn't closed.
The ESLint rule should consider valid:
When a Test.createTestingModule() is executed in the beforeEach() and the module is then closed in the afterEach() hook
When a Test.createTestingModule() is executed in the beforeAll() and the module is then closed in the afterAll() hook
When a Test.createTestingModule() is executed, followed by a module.createNestApp(), and then the application is closed in the correct hook
The text was updated successfully, but these errors were encountered:
Description
We need a Rule that enforces closing a
TestingModule
. When we create a module in tests and don't close it we potentially leak memory and/or database connections.Acceptance Criteria
The ESLint rule should warn when:
Test.createTestingModule()
is executed in thebeforeEach()
hook, but then the module isn’t closed in the afterEach()Test.createTestingModule()
is executed in thebeforeAll()
hook, but isn’t closed in the afterAll() one.Test.createTestingModule()
is executed within atest
, orit
block, but isn't closed.The ESLint rule should consider valid:
Test.createTestingModule()
is executed in thebeforeEach()
and the module is then closed in theafterEach()
hookTest.createTestingModule()
is executed in thebeforeAll()
and the module is then closed in theafterAll()
hookTest.createTestingModule()
is executed, followed by amodule.createNestApp()
, and then theapplication
is closed in the correct hookThe text was updated successfully, but these errors were encountered: