File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { expect } from 'chai' ;
2
2
3
- import { AuthProvider , MongoRuntimeError } from '../../../mongodb' ;
3
+ import { type AuthContext , AuthProvider , MongoRuntimeError } from '../../../mongodb' ;
4
4
5
5
describe ( 'AuthProvider' , function ( ) {
6
6
describe ( '#reauth' , function ( ) {
7
7
context ( 'when the provider is already reauthenticating' , function ( ) {
8
- //@ts -expect-error: cannot make an instance of an abstract class
9
- const provider = new AuthProvider ( ) ;
8
+ const provider = new ( class extends AuthProvider {
9
+ override auth ( _context : AuthContext ) : Promise < void > {
10
+ throw new Error ( 'Method not implemented.' ) ;
11
+ }
12
+ } ) ( ) ;
13
+
10
14
const context = { reauthenticating : true } ;
11
15
12
16
it ( 'returns an error' , async function ( ) {
You can’t perform that action at this time.
0 commit comments