mirror of
https://github.com/pocketbase/pocketbase.git
synced 2024-11-24 17:07:00 +02:00
removed test js file
This commit is contained in:
parent
8430944650
commit
a79f3a7c56
@ -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);
|
||||
});
|
Loading…
Reference in New Issue
Block a user