Linus Hüsler

Results 7 comments of Linus Hüsler

I can prevent this error by using fake timers: jest.test.setup.js: `` jest.useFakeTimers(); ``

Is there a workaround for using Node 14?

@nikzanda there is already a pull request that solves this problem: https://github.com/react-component/picker/pull/289

this works for me: ```typescript const dealLocal = (locale: string) => { const loc = locale.replace(/_/g, ''); const head = locale.slice(0, locale.indexOf('_')); return Locale[loc] ? loc : head; }; ```

It seems that the problem lies more with reading the saved document: ```` const mongoose = require('mongoose'); const fs = require('fs').promises; console.log(mongoose.version); mongoose.connect('mongodb://localhost:27017/mongoose-repro'); const pdfSchema = new mongoose.Schema({ pdfSettings: {...

In MongoDB, my document looks like this: ```` { "_id" : ObjectId("66f6b41326724ab0f8bd63a8"), "pdfSettings" : { "fileContent" : { "$binary" : "JVBERi0xLjMKJcTl8uXrp/Og0MTGCjQgMCBvYmoK...", "$type" : "00" }, "fileName" : "sample.pdf" }, "__v"...

If I run the script with mongoose 8.5.2, I get this values: ```` 8.5.2 Reloaded document: new ObjectId('66f6b41326724ab0f8bd63a8') Reloaded file content: ````