Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Commit

Permalink
Add test cases to support rtfeldman#78
Browse files Browse the repository at this point in the history
  • Loading branch information
kachkaev committed Sep 17, 2018
1 parent 7e7a08c commit ead53cc
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,30 @@ describe("#compile", function() {

}).to.throw();
});

it("throws when given a non-existing pathToElm", function () {
var opts = {
cwd: fixturesDir,
pathToElm: '/path/to/non-existing/elm'
};

expect(function() {
var compileProcess = compiler.compile(prependFixturesDir("Parent.elm"), opts);

}).to.throw();
});

it("throws when given pathToElm pointing to a directory", function () {
var opts = {
cwd: fixturesDir,
pathToElm: fixturesDir
};

expect(function() {
var compileProcess = compiler.compile(prependFixturesDir("Parent.elm"), opts);

}).to.throw();
});
});

describe("#compileToString", function() {
Expand Down

0 comments on commit ead53cc

Please sign in to comment.