1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-02 12:27:08 +01:00

Numerous fixes.

This commit is contained in:
hacksalot
2016-02-13 16:08:45 -05:00
parent 3f8e795c61
commit ca92d41d9e
25 changed files with 6446 additions and 42 deletions

View File

@ -18,7 +18,7 @@ var chai = require('chai')
describe('Testing CLI interface', function () {
this.timeout(10000);
this.timeout(20000);
function run( args, expErr ) {
var title = args;

View File

@ -41,7 +41,7 @@ function MyConsoleLog() {
describe('Testing Ouput interface', function () {
this.timeout(20000);
// HackMyResume CLI stub. Handle a single HMR invocation.
function HackMyResumeOutputStub( args ) {

View File

@ -18,7 +18,8 @@ var chai = require('chai')
, READFILES = require('recursive-readdir-sync')
, fileContains = require('../../dist/utils/file-contains')
, FS = require('fs')
, CHALK = require('chalk');
, CHALK = require('chalk')
, DIRCOMP = require('dir-compare');
chai.config.includeStack = true;
@ -91,12 +92,26 @@ function folderContains( needle, haystack ) {
});
}
function foldersMatch( a, b ) {
var ret;
ret = DIRCOMP.compareSync(a, b, {compareSize: true, skipSubdirs: true});
if( !ret.same ) return false;
ret = DIRCOMP.compareSync(a, b, {compareContent: true, skipSubdirs: true});
return ret.differences === 1;
}
genThemes( 'jane-q-fullstacker', ['node_modules/fresh-test-resumes/src/fresh/jane-fullstacker.json'], 'FRESH' );
genThemes( 'johnny-trouble', ['node_modules/fresh-test-resumes/src/fresh/johnny-trouble.json'], 'FRESH' );
genThemes( 'richard-hendriks', ['test/resumes/jrs-0.0.0/richard-hendriks.json'], 'JRS' );
describe('Verifying generated theme files...', function() {
it('Generated files should not contain ICE.', function() {
expect( folderContains('@@@@', '../sandbox') ).to.be.false;
});
it('Generated files should match exemplars...', function() {
expect( foldersMatch( 'test/sandbox/FRESH/jane-q-fullstacker/modern', 'test/expected/modern' ) ).to.be.true;
});
});