File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33const files = require ( "./files" ) ;
44
55const mocks = module . exports = {
6+ /**
7+ * Returns the `git` commands that were executed.
8+ *
9+ * @returns {string[] }
10+ */
11+ git ( ) {
12+ return mocks . gitDetails ( ) . map ( mock => mock . cmd ) ;
13+ } ,
14+
615 /**
716 * Returns information about each time `git` was executed.
817 *
918 * @returns {object[] }
1019 */
11- git ( ) {
20+ gitDetails ( ) {
1221 return mocks . all ( ) . filter ( mock => mock . bin === "git" ) ;
1322 } ,
1423
24+ /**
25+ * Returns the `npm` commands that were executed.
26+ *
27+ * @returns {string[] }
28+ */
29+ npm ( ) {
30+ return mocks . npmDetails ( ) . map ( mock => mock . cmd ) ;
31+ } ,
32+
1533 /**
1634 * Returns information about each time `npm` was executed.
1735 *
1836 * @returns {object[] }
1937 */
20- npm ( ) {
38+ npmDetails ( ) {
2139 return mocks . all ( ) . filter ( mock => mock . bin === "npm" ) ;
2240 } ,
2341
@@ -44,6 +62,8 @@ const mocks = module.exports = {
4462 array . push ( {
4563 bin,
4664
65+ args,
66+
4767 // Record the command that was executed
4868 cmd : bin + " " + args . map ( quoteArgs ) . join ( " " ) ,
4969
You can’t perform that action at this time.
0 commit comments