Files
app-ethereum/tests/zemu/globalsetup.js

18 lines
379 B
JavaScript
Raw Normal View History

2021-05-26 12:08:40 +02:00
import Zemu from "@zondax/zemu";
2021-08-26 14:27:49 +02:00
import fsExtra from "fs-extra";
2021-05-26 12:08:40 +02:00
const catchExit = async () => {
process.on("SIGINT", () => {
Zemu.stopAllEmuContainers(function () {
process.exit();
});
});
};
module.exports = async () => {
await catchExit();
await Zemu.checkAndPullImage();
await Zemu.stopAllEmuContainers();
2021-08-26 14:27:49 +02:00
fsExtra.emptyDirSync("snapshots/tmp")
};