From e794d7724ef0bd75ebb1fc29592e36c618b72ebb Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 15 May 2020 07:11:17 +0200 Subject: [PATCH] Add tests for path not found --- test/lib/Tests.re | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/lib/Tests.re b/test/lib/Tests.re index 85fb43d..7a29101 100644 --- a/test/lib/Tests.re +++ b/test/lib/Tests.re @@ -41,3 +41,15 @@ describe("Duplicates", ({test}) => { expect.fn(extract).toThrowException(Extractor.DuplicateMessageId("test3.msg1.1")); }); }); + +describe("Path not found", ({test}) => { + test("dirNotFound", ({expect}) => { + let extract = () => extractAndGetJson(["someDir"]); + expect.fn(extract).toThrowException(Extractor.PathNotFound("someDir")); + }); + + test("fileNotFound", ({expect}) => { + let extract = () => extractAndGetJson(["testData/test1/SomeFile.re"]); + expect.fn(extract).toThrowException(Extractor.PathNotFound("testData/test1/SomeFile.re")); + }); +});