These are chat archives for ensime/ensime-atom

27th
Feb 2016
Jari Pennanen
@Ciantic
Feb 27 2016 21:53
@hedefalk I've reimplemented the following parts in TypeScript for my stab at VSC extension:
describe('Coursier', function () {
    this.timeout(15000);
    it("Should find the download (external)", async () => {
        let req = await server.downloadCoursier();
        assert.equal(req.statusCode, 200, 'found the file');
    });

    it("Should get or create the coursier (external)", () => {
        return server.getOrCreateCoursier();
    });
});

describe('Ensime server installation', function () {
    this.timeout(60000 * 5);

    it("Should find Java binary", async () => {
        let javaBin = await server.getJavaBin();
        var name, n;
        if (IS_WINDOWS) {
            n = -8
            name = "java.exe"
        } else {
            n = -4
            name = "java"
        }
        assert.equal(javaBin.slice(n), name);
    });

    it("Should download and install ensime server (external)", async () => {
        let a = await server.installEnsimeServer(true);
        assert(a.length > 1);
    });

    it("Should get installed ensime classpath from (external)", async () => {
        let a = await server.getOrCreateEnsimeServerClasspath();
        assert(a.length > 1);
    });
});

describe('Ensime server', function () {
    it("Start ensime server", async () => {
        let p = await server.startEnsimeServer();
        let d = when.defer();
        p.stdout.on("data", d => {
            console.log(d.toString('utf8'));
        });
        p.stderr.on("data", d => {
            console.log("error: " + d.toString('utf8'));
        });
        return d.promise;
    });
});
Rory Graves
@rorygraves
Feb 27 2016 21:54
Best way to show this is to link to your github repo for it.
Jari Pennanen
@Ciantic
Feb 27 2016 21:55
these are parts that would be shared by ensime-node, but it's too soon to detach these to separate project, but my intention is to write them pretty easily detachable
Rory Graves
@rorygraves
Feb 27 2016 21:55
cool
fair enough
Jari Pennanen
@Ciantic
Feb 27 2016 21:55
@rorygraves it's too soon, it has more microsoft vsc example code than I would like to
I have to scrub that stuff away, but I want to get this running first
Rory Graves
@rorygraves
Feb 27 2016 21:56
no problem