-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Laurent RENARD
authored and
Laurent RENARD
committed
Oct 25, 2019
1 parent
d4cb97d
commit d410a37
Showing
9 changed files
with
70 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,11 +62,11 @@ Each framework runs with its default settings. | |
|
||
Here are the result of different test frameworks on my developer machine (MacBook Pro, 2.7GH i5) with node 12 : | ||
|
||
| | [email protected] | [email protected] | [email protected] | [email protected] | [email protected]| | ||
|--------|:------------:|:-----------: |:-------------:|:------------:|:----------:| | ||
|Library | 102ms | 1240ms | 2835ms | 1888ms | 1349ms | | ||
|Web app | 134ms | 3523ms | 4084ms | 2900ms | 3696ms | | ||
|API | 187ms | 12586ms | 7380ms | 3900ms | 12766ms | | ||
| | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | [email protected]| | ||
|--------|:------------:|:------------:|:------------:|:-------------:|:------------:|:----------:| | ||
|Library | 102ms | 231ms | 1240ms | 2835ms | 1888ms | 1349ms | | ||
|Web app | 134ms | 278ms | 3523ms | 4084ms | 2900ms | 3696ms | | ||
|API | 187ms | 331ms | 12586ms | 7380ms | 3900ms | 12766ms | | ||
|
||
Of course as any benchmark, it may not cover your use case and you should probably run your own tests before you draw any conclusion. | ||
|
||
|
@@ -83,9 +83,9 @@ In my opinions: | |
|
||
As a result zora is much smaller of an install according to [packagephobia](https://packagephobia.now.sh) than all the others test frameworks | ||
|
||
| | zora | tape | Jest | AvA | Mocha| | ||
|--------|:------------:|:-----------:|:-------------:|:------------:|:------------:| | ||
|Install size | [![zora](https://packagephobia.now.sh/badge?p=zora)](https://packagephobia.now.sh/result?p=zora) | [![tape](https://packagephobia.now.sh/badge?p=tape)](https://packagephobia.now.sh/result?p=tape) | [![jes](https://packagephobia.now.sh/badge?p=jest)](https://packagephobia.now.sh/result?p=jest) | [![ava](https://packagephobia.now.sh/badge?p=ava)](https://packagephobia.now.sh/result?p=ava) | [![mocha](https://packagephobia.now.sh/badge?p=mocha)](https://packagephobia.now.sh/result?p=mocha) | | ||
| | zora | pta |tape | Jest | AvA | Mocha| | ||
|--------|:------------:|:------------:|:-----------:|:-------------:|:------------:|:------------:| | ||
|Install size | [![zora](https://packagephobia.now.sh/badge?p=zora)](https://packagephobia.now.sh/result?p=zora) | [![pta](https://packagephobia.now.sh/badge?p=pta)](https://packagephobia.now.sh/result?p=pta) | [![tape](https://packagephobia.now.sh/badge?p=tape)](https://packagephobia.now.sh/result?p=tape) | [![jes](https://packagephobia.now.sh/badge?p=jest)](https://packagephobia.now.sh/result?p=jest) | [![ava](https://packagephobia.now.sh/badge?p=ava)](https://packagephobia.now.sh/result?p=ava) | [![mocha](https://packagephobia.now.sh/badge?p=mocha)](https://packagephobia.now.sh/result?p=mocha) | | ||
|
||
### Reporting is handled with another process (TAP aware) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
const test = require('ava'); | ||
for (let i = 0; i < 8; i++) { | ||
for (let i = 0; i < 10; i++) { | ||
test('test ' + i, async function (assert) { | ||
await new Promise(resolve => { | ||
setTimeout(()=>resolve(),50); | ||
setTimeout(()=>resolve(),100); | ||
}); | ||
assert.truthy(Math.random() * 100 > 3); | ||
assert.truthy(Math.random() * 100 > 5); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
describe('add', function () { | ||
for (let i = 0; i < 8; i++) { | ||
for (let i = 0; i < 10; i++) { | ||
it('should test',async function () { | ||
await new Promise(resolve => { | ||
setTimeout(()=>resolve(),50); | ||
setTimeout(()=>resolve(),100); | ||
}); | ||
expect(Math.random() * 100 > 3).toBeTruthy(); | ||
expect(Math.random() * 100 > 5).toBeTruthy(); | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
const assert = require('assert'); | ||
describe('test file', function() { | ||
for(let i=0; i < 8;i++){ | ||
for(let i=0; i < 10;i++){ | ||
it('test ' + i, function(done) { | ||
setTimeout(()=>{ | ||
assert.ok(Math.random() * 100 > 3); | ||
assert.ok(Math.random() * 100 > 5); | ||
done(); | ||
},50); | ||
},100); | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
const test = require('tape'); | ||
for (let i = 0; i < 8; i++) { | ||
for (let i = 0; i < 10; i++) { | ||
test('test ' + i, function (assert) { | ||
setTimeout(()=>{ | ||
assert.ok(Math.random() * 100 > 3); | ||
assert.ok(Math.random() * 100 > 5); | ||
assert.end(); | ||
},50); | ||
},100); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
module.exports =(({test}) => { | ||
for (let i = 0; i < 8; i++) { | ||
for (let i = 0; i < 10; i++) { | ||
test('test ' + i, async function (assert) { | ||
await new Promise(resolve => { | ||
setTimeout(()=>resolve(),50); | ||
setTimeout(()=>resolve(),100); | ||
}); | ||
assert.ok(Math.random() * 100 > 3); | ||
assert.ok(Math.random() * 100 > 5); | ||
}); | ||
}}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters