test(api): create a way to check current working directory
This commit is contained in:
parent
a49d8c1f63
commit
d6c12d5ed8
13
server/api/dev/testing/tmpdir.ts
Normal file
13
server/api/dev/testing/tmpdir.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import { log } from "@server/logger";
|
||||||
|
import * as fs from "fs";
|
||||||
|
|
||||||
|
export default eventHandler(async (ev) => {
|
||||||
|
try {
|
||||||
|
fs.readFileSync("tmp/.gitkeep");
|
||||||
|
} catch (e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
cwd: process.cwd(),
|
||||||
|
};
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user