-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #360 from sparksuite/allow-accepts-to-be-callback
Allow accepts to be callback
- Loading branch information
Showing
11 changed files
with
190 additions
and
16 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
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
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
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
1 change: 1 addition & 0 deletions
1
test-projects/pizza-ordering/cli/order/dynamic-async-accepts/dynamic-async-accepts.js
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = async function() {}; |
24 changes: 24 additions & 0 deletions
24
test-projects/pizza-ordering/cli/order/dynamic-async-accepts/dynamic-async-accepts.spec.js
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
async function dataAllows() { | ||
await new Promise((resolve) => setTimeout(resolve, 10)); | ||
return ['a1', 'b1', 'c1', 'd1']; | ||
} | ||
|
||
async function testAllows() { | ||
await new Promise((resolve) => setTimeout(resolve, 10)); | ||
return ['a2', 'b2', 'c2', 'd2']; | ||
} | ||
|
||
module.exports = { | ||
description: 'Just used for testing', | ||
data: { | ||
description: 'What type of pizza to order', | ||
accepts: dataAllows, | ||
}, | ||
options: { | ||
test: { | ||
description: 'Just used for testing', | ||
accepts: testAllows, | ||
}, | ||
}, | ||
acceptsPassThroughArgs: false, | ||
}; |
1 change: 1 addition & 0 deletions
1
test-projects/pizza-ordering/cli/order/dynamic-sync-accepts/dynamic-sync-accepts.js
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = async function() {}; |
23 changes: 23 additions & 0 deletions
23
test-projects/pizza-ordering/cli/order/dynamic-sync-accepts/dynamic-sync-accepts.spec.js
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function dataAllows() { | ||
return ['a1', 'b1', 'c1', 'd1']; | ||
} | ||
|
||
function testAllows() { | ||
return ['a2', 'b2', 'c2', 'd2']; | ||
} | ||
|
||
|
||
module.exports = { | ||
description: 'Just used for testing', | ||
data: { | ||
description: 'What type of pizza to order', | ||
accepts: dataAllows, | ||
}, | ||
options: { | ||
test: { | ||
description: 'Just used for testing', | ||
accepts: testAllows, | ||
}, | ||
}, | ||
acceptsPassThroughArgs: false, | ||
}; |