I'm trying to use better-sqlite3 with jest. better-sqlite3 depends on this module and apparently there's a problem running it via jest. I already found https://github.com/JoshuaWise/better-sqlite3/issues/45 which gives some insight.
I completely understand not wanting to remove functionality for Jest, and I wouldn't recommend removing Integer. However, with these small changes I was able to get it work. I think it's a good compromise and, while it may not be quite as sound as defining static property, being compatible with the current JS ecosystem is going to help better-sqlite3 be used a lot more.
Sidenote: I love lovelove better-sqlite3. Thank you so much. I was able to remove so much complexity in my app by using simple synchronous APIs, and I've never understood why node-sqlite3 is asynchronous because sqlite3 itself is not async. It only ever runs one query at a time. Why in the world would we be using async bindings to it? Your library is exactly what I've been looking for and it's so, so much better.
I'm trying to use better-sqlite3 with jest. better-sqlite3 depends on this module and apparently there's a problem running it via jest. I already found https://github.com/JoshuaWise/better-sqlite3/issues/45 which gives some insight.
I completely understand not wanting to remove functionality for Jest, and I wouldn't recommend removing Integer. However, with these small changes I was able to get it work. I think it's a good compromise and, while it may not be quite as sound as defining static property, being compatible with the current JS ecosystem is going to help better-sqlite3 be used a lot more.
Sidenote: I love love love better-sqlite3. Thank you so much. I was able to remove so much complexity in my app by using simple synchronous APIs, and I've never understood why node-sqlite3 is asynchronous because sqlite3 itself is not async. It only ever runs one query at a time. Why in the world would we be using async bindings to it? Your library is exactly what I've been looking for and it's so, so much better.