Skip to content

Commit

Permalink
cleanup source
Browse files Browse the repository at this point in the history
  • Loading branch information
dkelosky committed Mar 17, 2018
1 parent 2bdd7a7 commit fc03407
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
22 changes: 11 additions & 11 deletions __tests__/example/FailingTests.example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ describe("Failing Tests", () => {
expect(JSON.stringify(jsonObject, null, 2)).toMatchSnapshot();
});

it("should fail with an error snapshot difference", ()=>{
expect(()=>{
throw new Error("Here is the new error.\nIt contains various new "+
"information such as how to write on a computer\n," +
"and a reminder to scrape an avocado onto your toast.");
it("should fail with an error snapshot difference", () => {
expect(() => {
throw new Error("Here is the new error.\nIt contains various new " +
"information such as how to write on a computer\n," +
"and a reminder to scrape an avocado onto your toast.");
}).toThrowErrorMatchingSnapshot();
});

it("should fail due to an error", () => {
throw new Error("This is an error failure");
});
it("should fail due to an error", () => {
throw new Error("This is an error failure");
});

it("Should fail due to a bad expectation", () => {
expect(false).toEqual(true);
})
it("Should fail due to a bad expectation", () => {
expect(false).toEqual(true);
})
});
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@types/diff2html": "0.0.4",
"@types/jest": "^22.0.5",
"@types/jquery": "^3.2.16",
"@types/mkdirp": "^0.5.2",
"@types/mustache": "^0.8.30",
"@types/node": "^8.0.0",
"browserify": "^16.1.0",
Expand Down Expand Up @@ -102,8 +103,7 @@
"resultDir": "results/jest-stare",
"additionalResultsProcessors": [
"jest-html-reporter",
"jest-junit",
"jest-stare"
"jest-junit"
]
},
"jest-html-reporter": {
Expand Down
3 changes: 2 additions & 1 deletion src/utils/IO.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from "fs";
import * as mkdirp from "mkdirp";

/**
* class for simple IO
Expand Down Expand Up @@ -46,7 +47,7 @@ export class IO {
*/
public static mkdirsSync(dir: string) {
if (!IO.existsSync(dir)) {
require("mkdirp").sync(dir);
mkdirp.sync(dir);
}
}

Expand Down

0 comments on commit fc03407

Please sign in to comment.