Page MenuHomeSealhub

global-teardown.ts
No OneTemporary

Authored By
Unknown
Size
636 B
Referenced Files
None
Subscribers
None

global-teardown.ts

import { glob } from "glob";
import * as fs from "fs/promises";
import * as path from "path";
export default async () => {
console.log("All tests finished. merging coverage information...");
try {
await fs.rm("coverage/tmp", { recursive: true });
} catch (e) {
console.error(
"Couldn't delete the './coverage/tmp' directory - maybe it wasn't there in the first place"
);
}
await fs.mkdir("coverage/tmp", { recursive: true });
let files = await glob("coverage/tmp_split/**/*.json");
await Promise.all(
files.map((file, index) => {
fs.copyFile(file, path.join("coverage", "tmp", path.basename(file)));
})
);
};

File Metadata

Mime Type
application/javascript
Expires
Sat, Nov 7, 16:00 (15 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1181797
Default Alt Text
global-teardown.ts (636 B)

Event Timeline