mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
two more
This commit is contained in:
parent
97723a1150
commit
b0bb3c1481
2 changed files with 9 additions and 10 deletions
|
@ -1,15 +1,15 @@
|
|||
var _ = require('underscore');
|
||||
var base = require('./base');
|
||||
|
||||
describe('GitEngine Levels', function() {
|
||||
it('solves levels', function() {
|
||||
var sequences = require('../../levels/index').levelSequences;
|
||||
_.each(Object.keys(sequences), function(sequenceKey) {
|
||||
Object.keys(sequences).forEach(function(sequenceKey) {
|
||||
var levels = sequences[sequenceKey];
|
||||
_.each(levels, function(levelBlob, index) {
|
||||
Object.keys(levels).forEach(function(index) {
|
||||
var levelBlob = levels[index];
|
||||
console.log('testing level', levelBlob.name.en_US);
|
||||
base.expectLevelSolved(levelBlob);
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
var _ = require('underscore');
|
||||
|
||||
var Command = require('../models/commandModel').Command;
|
||||
|
||||
describe('commands', function() {
|
||||
|
@ -11,10 +9,11 @@ describe('commands', function() {
|
|||
};
|
||||
|
||||
var c = new Command({rawStr: 'foo'});
|
||||
_.each(testCases, function(expected, input) {
|
||||
Object.keys(testCases).forEach(function(input) {
|
||||
var expected = testCases[input];
|
||||
var actual = c.replaceDotWithHead(input);
|
||||
expect(actual).toBe(expected);
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
|
||||
it('maps options and general args', function() {
|
||||
|
@ -32,7 +31,7 @@ describe('commands', function() {
|
|||
}];
|
||||
|
||||
var c = new Command({rawStr: 'foo'});
|
||||
_.each(testCases, function(tCase) {
|
||||
testCases.forEach(function(tCase) {
|
||||
c.setOptionsMap(tCase.options);
|
||||
c.setGeneralArgs(tCase.args);
|
||||
c.mapDotToHead();
|
||||
|
@ -49,7 +48,7 @@ describe('commands', function() {
|
|||
).toBe(
|
||||
j(tCase.gitOptions)
|
||||
);
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue