Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent RENARD authored and Laurent RENARD committed Nov 7, 2019
1 parent dc8b379 commit 347d818
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ Fast javascript testing library for **nodejs** and **browsers**

``npm i --save-dev zora``

Note that the version 3 of zora targets modern Javascript engines. Behind the scene it uses *Asynchronous iterators* and *for await* statement. Both
are supported by Node (>= 10 or >= 8 with flag) and all the major browsers. If you wish to use the v2 you can find its code and documentation on the [v2 branch](https://github.com/lorenzofox3/zora/tree/v2).
If you are interested in a test runner for Nodejs, checkout [pta](https://github.com/lorenzofox3/zora-node) built on top of zora

## (Un)Opinions and Design

These are the following rules and ideas I have followed while developing zora. Whether they are right or not is an entire different topic ! :D
Note I have decided to develop zora specially because I was not able to find a tool which complies entirely with these ideas.

[read more](https://dev.to/lorenzofox3/tools-and-the-design-of-a-testing-experience-2mdc) on how it fits in the [UNIX philosophy](https://en.wikipedia.org/wiki/Unix_philosophy)
[read more](https://dev.to/lorenzofox3/tools-and-the-design-of-a-testing-experience-2mdc) on how it fits in the [UNIX philosophy](https://en.wikipedia.org/wiki/Unix_philosophy) or on how [it can achieve great performances](https://dev.to/lorenzofox3/there-is-beauty-in-simplicity-1npe).

### Tests are regular Javascript programs.

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/ava/test/test1.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const test = require('ava');
for (let i = 0; i < 8; i++) {
test('test ' + i, async function (assert) {
await new Promise(resolve => {
setTimeout(()=>resolve(),250);
setTimeout(()=>resolve(),100);
});
assert.truthy(Math.random() * 100 > 3);
assert.truthy(Math.random() * 100 > 1);
});
}
4 changes: 2 additions & 2 deletions benchmarks/jest/test/test1.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ describe('add', function () {
for (let i = 0; i < 8; i++) {
it('should test',async function () {
await new Promise(resolve => {
setTimeout(()=>resolve(),250);
setTimeout(()=>resolve(),100);
});
expect(Math.random() * 100 > 3).toBeTruthy();
expect(Math.random() * 100 > 1).toBeTruthy();
});
}
});
4 changes: 2 additions & 2 deletions benchmarks/mocha/test/test1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ describe('test file', function() {
for(let i=0; i < 8;i++){
it('test ' + i, function(done) {
setTimeout(()=>{
assert.ok(Math.random() * 100 > 3);
assert.ok(Math.random() * 100 > 1);
done();
},250);
},100);
});
}
});
4 changes: 2 additions & 2 deletions benchmarks/tape/test/test1.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const test = require('tape');
for (let i = 0; i < 8; i++) {
test('test ' + i, function (assert) {
setTimeout(()=>{
assert.ok(Math.random() * 100 > 3);
assert.ok(Math.random() * 100 > 1);
assert.end();
},250);
},100);
});
}
4 changes: 2 additions & 2 deletions benchmarks/zora/test/test1.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module.exports =(({test}) => {
for (let i = 0; i < 8; i++) {
test('test ' + i, async function (assert) {
await new Promise(resolve => {
setTimeout(()=>resolve(),250);
setTimeout(()=>resolve(),100);
});
assert.ok(Math.random() * 100 > 3);
assert.ok(Math.random() * 100 > 1);
});
}});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"typescript": "^3.6.4"
},
"jest": {
"testRegex": ".*.js",
"testRegex": "test\\d+.js",
"roots": [
"./benchmarks/jest/test"
],
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const path = require('path');

const filesCount = 20;
const testCount = 8;
const waitTime = 250;
const errorRate = 3;
const waitTime = 100;
const errorRate = 1;

const zoraCode = `
module.exports =(({test}) => {
Expand Down

0 comments on commit 347d818

Please sign in to comment.