diff --git a/readme.md b/readme.md index 6e3eb6d..f8094c1 100644 --- a/readme.md +++ b/readme.md @@ -147,23 +147,23 @@ noe -b junit -w 'test/*.js' -- 'test/*.js' // We use `it.eq` to assert on both simple type and complex object. it.eq("ok", "ok") ); - + it("test 2", async () => { // No more callback hell while testing async functions. await new junit.Promise(r => setTimeout(r, 1000)); - + return it.eq({ a: 1, b: 2 }, { a: 1, b: 2 }); }); - + // Run sync tests within the main async flow. - await it("test 3", (after) => + await it("test 3", (after) => { after(() => { // do some clean work after the test }); - - it.eq("ok", "ok") - ); - + + return it.eq("ok", "ok"); + }); + it.run(); })(); ``` @@ -174,7 +174,7 @@ noe -b junit -w 'test/*.js' -- 'test/*.js' ```js import junit from "junit"; var it = junit({ - filter: (msg) => msg.indexOf("test") + filter: (msg) => msg.indexOf("test"); }); (async () => {