diff --git a/tools/types/untitled.js.erb b/tools/types/untitled.js.erb deleted file mode 100644 index 93939fcf..00000000 --- a/tools/types/untitled.js.erb +++ /dev/null @@ -1,27 +0,0 @@ -const { exec } = require('node:child_process'); - -// you can use any other library for copying directories recursively -const fse = require('fs-extra'); - -let controller; // this will be used to terminate the PocketBase process - -const srcTestDirPath = "./test_pb_data"; -const tempTestDirPath = "./temp_test_pb_data"; - -beforeEach(() => { - // copy test_pb_date to a temp location - fse.copySync(srcTestDirPath, tempTestDirPath); - - controller = new AbortController(); - - // start PocketBase with the test_pb_data - exec('./pocketbase serve --dir=' + tempTestDirPath, { signal: controller.signal}); -}); - -afterEach(() => { - // stop the PocketBase process - controller.abort(); - - // clean up the temp test directory - fse.removeSync(tempTestDirPath); -});