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