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,
|
|
|
|
});
|
|
|
|
|
|
|
|
it("should get init msg", (done) => {
|
2019-01-19 05:46:40 +08:00
|
|
|
client.initData.then((data) => {
|
2019-01-16 02:36:09 +08:00
|
|
|
expect(data.dataDirectory).toEqual(dataDirectory);
|
|
|
|
expect(data.workingDirectory).toEqual(workingDirectory);
|
2019-02-20 00:42:32 +08:00
|
|
|
expect(data.builtInExtensionsDirectory).toEqual(builtInExtensionsDirectory);
|
2019-01-16 02:36:09 +08:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
2019-01-19 05:46:40 +08:00
|
|
|
});
|