mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
ok money on create
This commit is contained in:
parent
f1c3ff9e72
commit
12e921a781
2 changed files with 13 additions and 6 deletions
|
@ -10,10 +10,10 @@ prompt.get(['command', 'whatItDoes'], function(err, result) {
|
||||||
var headless = new HeadlessGit();
|
var headless = new HeadlessGit();
|
||||||
headless.sendCommand(result.command);
|
headless.sendCommand(result.command);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var testCase = '\texpectTreeAsync(' +
|
var testCase = '\t\texpectTreeAsync(\n' +
|
||||||
"\t\t'" + result.command + "'," +
|
"\t\t\t'" + result.command + "',\n" +
|
||||||
"\t\t'" + headless.gitEngine.printTree() + "'" +
|
"\t\t\t'" + headless.gitEngine.printTree() + "'\n" +
|
||||||
"\t);";
|
"\t\t);\n";
|
||||||
|
|
||||||
console.log(testCase);
|
console.log(testCase);
|
||||||
// now add it
|
// now add it
|
||||||
|
@ -23,8 +23,8 @@ prompt.get(['command', 'whatItDoes'], function(err, result) {
|
||||||
var partOne = testFile.slice(0, toSlice);
|
var partOne = testFile.slice(0, toSlice);
|
||||||
var partTwo = testFile.slice(toSlice);
|
var partTwo = testFile.slice(toSlice);
|
||||||
|
|
||||||
var funcCall = "it('" + result.whatItDoes + "', function() {\n" +
|
var funcCall = "\tit('" + result.whatItDoes + "', function() {\n" +
|
||||||
testCase + "\n});";
|
testCase + "\t});\n\n";
|
||||||
fs.writeFileSync('./remote.spec.js', partOne + funcCall + partTwo);
|
fs.writeFileSync('./remote.spec.js', partOne + funcCall + partTwo);
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
|
@ -297,5 +297,12 @@ describe('Git Remotes', function() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('correctly resolves existing commits and upates', function() {
|
||||||
|
expectTreeAsync(
|
||||||
|
'git clone; git push master:foo; git fakeTeamwork foo 2; git fetch origin foo^:blah;go C0; git fetch origin foo^:master',
|
||||||
|
'{"branches":{"master":{"target":"C2","id":"master","remoteTrackingBranchID":"o/master"},"o/master":{"target":"C1","id":"o/master","remoteTrackingBranchID":null},"o/foo":{"target":"C1","id":"o/foo","remoteTrackingBranchID":null},"blah":{"target":"C2","id":"blah","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"}},"HEAD":{"target":"C0","id":"HEAD"},"originTree":{"branches":{"master":{"target":"C1","id":"master","remoteTrackingBranchID":null},"foo":{"target":"C3","id":"foo","remoteTrackingBranchID":null}},"commits":{"C0":{"parents":[],"id":"C0","rootCommit":true},"C1":{"parents":["C0"],"id":"C1"},"C2":{"parents":["C1"],"id":"C2"},"C3":{"parents":["C2"],"id":"C3"}},"HEAD":{"target":"foo","id":"HEAD"}}}'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue