1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-07-05 01:20:06 +01:00

Refactor theme tests.

This commit is contained in:
devlinjd 2015-12-12 11:13:37 -05:00
parent b38a7c1da2
commit f5a8e36e50

View File

@ -26,85 +26,27 @@ describe('Testing themes', function () {
useful: 'green', useful: 'green',
}); });
it('HELLO-WORLD theme should generate without throwing an exception', function () { function genTheme( themeName ) {
function tryOpen() { it( themeName.toUpperCase() + ' theme should generate without throwing an exception', function () {
var src = ['node_modules/FRESCA/exemplar/jane-doe.json']; function tryOpen() {
var dst = ['tests/sandbox/hello-world/resume.all']; var src = ['node_modules/FRESCA/exemplar/jane-doe.json'];
var opts = { var dst = ['tests/sandbox/hello-world/resume.all'];
theme: 'hello-world', var opts = {
format: 'FRESH', theme: themeName,
prettify: true, format: 'FRESH',
silent: false prettify: true,
}; silent: false
FCMD.verbs.build( src, dst, opts ); };
} FCMD.verbs.build( src, dst, opts );
tryOpen.should.not.Throw(); }
}); tryOpen.should.not.Throw();
});
}
it('COMPACT theme should generate without throwing an exception', function () { genTheme('hello-world');
function tryOpen() { genTheme('compact');
var src = ['node_modules/FRESCA/exemplar/jane-doe.json']; genTheme('modern');
var dst = ['tests/sandbox/compact/resume.all']; genTheme('minimist');
var opts = { genTheme('awesome');
theme: 'compact',
format: 'FRESH',
prettify: true,
silent: false
};
FCMD.verbs.build( src, dst, opts );
}
tryOpen.should.not.Throw();
});
it('MODERN theme should generate without throwing an exception', function () {
function tryOpen() {
var src = ['node_modules/FRESCA/exemplar/jane-doe.json'];
var dst = ['tests/sandbox/modern/resume.all'];
var opts = {
theme: 'modern',
format: 'FRESH',
prettify: true,
silent: false
};
FCMD.verbs.build( src, dst, opts );
}
tryOpen.should.not.Throw();
});
it('MINIMIST theme should generate without throwing an exception', function () {
function tryOpen() {
var src = ['node_modules/FRESCA/exemplar/jane-doe.json'];
var dst = ['tests/sandbox/minimist/resume.all'];
var opts = {
theme: 'minimist',
format: 'FRESH',
prettify: true,
silent: false
};
FCMD.verbs.build( src, dst, opts );
}
tryOpen.should.not.Throw();
});
it('AWESOME theme should generate without throwing an exception', function () {
function tryOpen() {
var src = ['node_modules/FRESCA/exemplar/jane-doe.json'];
var dst = ['tests/sandbox/awesome/resume.all'];
var opts = {
theme: 'awesome',
format: 'FRESH',
prettify: true,
silent: false
};
FCMD.verbs.build( src, dst, opts );
}
tryOpen.should.not.Throw();
});
}); });
// describe('subtract', function () {
// it('should return -1 when passed the params (1, 2)', function () {
// expect(math.subtract(1, 2)).to.equal(-1);
// });
// });