mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +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');
|
var base = require('./base');
|
||||||
|
|
||||||
describe('GitEngine Levels', function() {
|
describe('GitEngine Levels', function() {
|
||||||
it('solves levels', function() {
|
it('solves levels', function() {
|
||||||
var sequences = require('../../levels/index').levelSequences;
|
var sequences = require('../../levels/index').levelSequences;
|
||||||
_.each(Object.keys(sequences), function(sequenceKey) {
|
Object.keys(sequences).forEach(function(sequenceKey) {
|
||||||
var levels = sequences[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);
|
console.log('testing level', levelBlob.name.en_US);
|
||||||
base.expectLevelSolved(levelBlob);
|
base.expectLevelSolved(levelBlob);
|
||||||
});
|
}.bind(this));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
var _ = require('underscore');
|
|
||||||
|
|
||||||
var Command = require('../models/commandModel').Command;
|
var Command = require('../models/commandModel').Command;
|
||||||
|
|
||||||
describe('commands', function() {
|
describe('commands', function() {
|
||||||
|
@ -11,10 +9,11 @@ describe('commands', function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
var c = new Command({rawStr: 'foo'});
|
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);
|
var actual = c.replaceDotWithHead(input);
|
||||||
expect(actual).toBe(expected);
|
expect(actual).toBe(expected);
|
||||||
});
|
}.bind(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('maps options and general args', function() {
|
it('maps options and general args', function() {
|
||||||
|
@ -32,7 +31,7 @@ describe('commands', function() {
|
||||||
}];
|
}];
|
||||||
|
|
||||||
var c = new Command({rawStr: 'foo'});
|
var c = new Command({rawStr: 'foo'});
|
||||||
_.each(testCases, function(tCase) {
|
testCases.forEach(function(tCase) {
|
||||||
c.setOptionsMap(tCase.options);
|
c.setOptionsMap(tCase.options);
|
||||||
c.setGeneralArgs(tCase.args);
|
c.setGeneralArgs(tCase.args);
|
||||||
c.mapDotToHead();
|
c.mapDotToHead();
|
||||||
|
@ -49,7 +48,7 @@ describe('commands', function() {
|
||||||
).toBe(
|
).toBe(
|
||||||
j(tCase.gitOptions)
|
j(tCase.gitOptions)
|
||||||
);
|
);
|
||||||
});
|
}.bind(this));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue