2019-01-16 02:36:09 +08:00
|
|
|
import { createClient } from "./helpers";
|
|
|
|
|
|
|
|
describe("Server", () => {
|
|
|
|
const dataDirectory = "/tmp/example";
|
|
|
|
const workingDirectory = "/working/dir";
|
2019-02-20 00:42:32 +08:00
|
|
|
const builtInExtensionsDirectory = "/tmp/example";
|
2019-03-13 00:12:50 +08:00
|
|
|
const cacheDirectory = "/tmp/cache";
|
2019-01-16 02:36:09 +08:00
|
|
|
const client = createClient({
|
2019-03-13 00:12:50 +08:00
|
|
|
builtInExtensionsDirectory,
|
|
|
|
cacheDirectory,
|
2019-01-16 02:36:09 +08:00
|
|
|
dataDirectory,
|
|
|
|
workingDirectory,
|
|
|
|
});
|
|
|
|
|
2019-04-03 06:44:28 +08:00
|
|
|
it("should get init msg", async () => {
|
|
|
|
const data = await client.initData;
|
|
|
|
expect(data.dataDirectory).toEqual(dataDirectory);
|
|
|
|
expect(data.workingDirectory).toEqual(workingDirectory);
|
|
|
|
expect(data.builtInExtensionsDirectory).toEqual(builtInExtensionsDirectory);
|
2019-01-16 02:36:09 +08:00
|
|
|
});
|
2019-01-19 05:46:40 +08:00
|
|
|
});
|