Skip to content

Commit 8489de1

Browse files
author
Kelly Selden
committed
reduce getArgs boilerplate
1 parent 09c6d2d commit 8489de1

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

test/unit/get-start-and-end-commands-test.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const loadSafeBlueprint = require('../../src/load-safe-blueprint');
1010
const loadDefaultBlueprint = require('../../src/load-default-blueprint');
1111

1212
const {
13-
getArgs
13+
getArgs: _getArgs
1414
} = _getStartAndEndCommands;
1515

1616
const projectName = 'my-custom-project';
@@ -771,12 +771,18 @@ describe(_getStartAndEndCommands, function() {
771771
});
772772
});
773773

774-
describe(getArgs, function() {
774+
describe(_getArgs, function() {
775+
function getArgs(options) {
776+
return _getArgs({
777+
projectName,
778+
...options
779+
});
780+
}
781+
775782
it('works for default app', function() {
776783
let blueprint = loadDefaultBlueprint(['welcome']);
777784

778785
let args = getArgs({
779-
projectName,
780786
blueprint
781787
});
782788

@@ -795,7 +801,6 @@ describe(_getStartAndEndCommands, function() {
795801
let blueprint = loadDefaultBlueprint(['addon']);
796802

797803
let args = getArgs({
798-
projectName,
799804
blueprint
800805
});
801806

@@ -818,7 +823,6 @@ describe(_getStartAndEndCommands, function() {
818823
});
819824

820825
let args = getArgs({
821-
projectName,
822826
blueprint
823827
});
824828

@@ -839,7 +843,6 @@ describe(_getStartAndEndCommands, function() {
839843
});
840844

841845
let args = getArgs({
842-
projectName,
843846
blueprint
844847
});
845848

@@ -862,7 +865,6 @@ describe(_getStartAndEndCommands, function() {
862865
};
863866

864867
let args = getArgs({
865-
projectName,
866868
blueprint
867869
});
868870

0 commit comments

Comments
 (0)