11import { expect } from 'chai' ;
22import { setTimeout } from 'timers' ;
33
4+ // Exception to the import from mongodb rule we're unit testing our public Errors API
5+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
46import * as importsFromErrorSrc from '../../src/error' ;
7+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
8+ import * as importsFromEntryPoint from '../../src/index' ;
59import {
610 DeprioritizedServers ,
711 isHello ,
@@ -25,31 +29,29 @@ import {
2529 needsRetryableWriteLabel ,
2630 NODE_IS_RECOVERING_ERROR_MESSAGE ,
2731 ns ,
28- PoolClosedError ,
32+ PoolClosedError as MongoPoolClosedError ,
2933 RunCommandOperation ,
3034 setDifference ,
3135 TimeoutContext ,
3236 type Topology ,
3337 type TopologyDescription ,
3438 type TopologyOptions ,
35- WaitQueueTimeoutError
39+ WaitQueueTimeoutError as MongoWaitQueueTimeoutError
3640} from '../mongodb' ;
37- // Exception to the import from mongodb rule we're unit testing our public Errors API
38- import * as importsFromEntryPoint from '../mongodb' ;
3941import { ReplSetFixture } from '../tools/common' ;
4042import { cleanup } from '../tools/mongodb-mock/index' ;
4143import { topologyWithPlaceholderClient } from '../tools/utils' ;
4244
43- describe . skip ( 'MongoErrors' , ( ) => {
45+ describe ( 'MongoErrors' , ( ) => {
4446 let errorClassesFromEntryPoint = Object . fromEntries (
4547 Object . entries ( importsFromEntryPoint ) . filter (
4648 ( [ key , value ] ) => key . endsWith ( 'Error' ) && value . toString ( ) . startsWith ( 'class' )
4749 )
4850 ) as any ;
4951 errorClassesFromEntryPoint = {
5052 ...errorClassesFromEntryPoint ,
51- PoolClosedError ,
52- WaitQueueTimeoutError
53+ MongoPoolClosedError ,
54+ MongoWaitQueueTimeoutError
5355 } ;
5456
5557 const errorClassesFromErrorSrc = Object . fromEntries (
0 commit comments