refactor: Use ES6, Test with AVA
- Use async/await instead of callbacks - Use execa to run command line - Use AVA for tests - Add several assertions in the unit tests - Add documentation (comments) in the tests - Run tests with a real git repo instead of mocking child_process and add test helpers to create repos, commits and checkout - Simplify test directory structure - Simplify code readability (mostly with async/await) - Use eslint for for linting, prettier for formatting
This commit is contained in:
committed by
Pierre Vanduynslager
parent
7fe0890350
commit
abf92ad03d
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
module.exports = function(config, options, cb) {
|
||||
cb(new Error('a'));
|
||||
};
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
module.exports = function(config, options, cb) {
|
||||
cb(new Error('b'));
|
||||
};
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
module.exports = function(config, options, cb) {
|
||||
cb(null, 'a');
|
||||
};
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
module.exports = function(config, options, cb) {
|
||||
cb(null, 'b');
|
||||
};
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module.exports = function(pluginConfig, options, cb) {
|
||||
cb(null, {pluginConfig, options});
|
||||
};
|
||||
Reference in New Issue
Block a user