Realm JS SDK - Best way to create separate local realm db for testing?

I’m using jest to run tests on my app which tests reading and writing to the local realm database on the device. It would be handy if there was an easy way to tell realm to use a different database file for this. Is it possible? Otherwise I guess I can write some code to run before/after the tests to backup/restore the existing database. But being able to simply specify a database file path when ininitialising the realm would be great. Setting the path config does not seem to solve this