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
In the slugify.test.ts file, the following options are no longer supported:
const options = {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false,
useUnifiedTopology: true,
};
Commenting out the options results in passing tests.
Original code results in these errors:
test/server/utils/slugify.test.ts:17:56 - error TS2769: No overload matches this call.
Overload 1 of 3, '(uri: string, callback: CallbackWithoutResult): void', gave the following error.
Argument of type '{ useNewUrlParser: boolean; useCreateIndex: boolean; useFindAndModify: boolean; useUnifiedTopology: boolean; }' is not assignable to parameter of type 'CallbackWithoutResult'.
Type '{ useNewUrlParser: boolean; useCreateIndex: boolean; useFindAndModify: boolean; useUnifiedTopology: boolean; }' provides no match for the signature '(error: NativeError): void'.
Overload 2 of 3, '(uri: string, options?: ConnectOptions): Promise<typeof import("mongoose")>', gave the following error.
Type '{ useNewUrlParser: boolean; useCreateIndex: boolean; useFindAndModify: boolean; useUnifiedTopology: boolean; }' has no properties in common with type 'ConnectOptions'.
In the slugify.test.ts file, the following options are no longer supported:
const options = {
useNewUrlParser: true,
useCreateIndex: true,
useFindAndModify: false,
useUnifiedTopology: true,
};
See mongoose 6 documentation
Commenting out the options results in passing tests.
Original code results in these errors:
test/server/utils/slugify.test.ts:17:56 - error TS2769: No overload matches this call.
Overload 1 of 3, '(uri: string, callback: CallbackWithoutResult): void', gave the following error.
Argument of type '{ useNewUrlParser: boolean; useCreateIndex: boolean; useFindAndModify: boolean; useUnifiedTopology: boolean; }' is not assignable to parameter of type 'CallbackWithoutResult'.
Type '{ useNewUrlParser: boolean; useCreateIndex: boolean; useFindAndModify: boolean; useUnifiedTopology: boolean; }' provides no match for the signature '(error: NativeError): void'.
Overload 2 of 3, '(uri: string, options?: ConnectOptions): Promise<typeof import("mongoose")>', gave the following error.
Type '{ useNewUrlParser: boolean; useCreateIndex: boolean; useFindAndModify: boolean; useUnifiedTopology: boolean; }' has no properties in common with type 'ConnectOptions'.
I tested with the code in the 4-end directory.
The text was updated successfully, but these errors were encountered: