mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-02 20:37:08 +01:00
Detect bad option files supplied via --options.
This commit is contained in:
10
test/scripts/hmr-options-broken.json
Normal file
10
test/scripts/hmr-options-broken.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
// Set the default theme to "compact"
|
||||
//"theme": "node_modules/jsonresume-theme-elegant",
|
||||
//"theme": "jsonresume-theme-elegant",
|
||||
"theme": "elegant",
|
||||
// Change the "employment" section title text to "Work"
|
||||
"sectionTitles": {
|
||||
"employment": "Work"
|
||||
}
|
||||
}
|
@ -143,9 +143,36 @@ describe('Testing Ouput interface', function () {
|
||||
'to',
|
||||
'test/sandbox/temp/janeq-3.all',
|
||||
'--options',
|
||||
"test/hmr-options.json",
|
||||
"test/scripts/hmr-options.json",
|
||||
"-t",
|
||||
"modern"
|
||||
],
|
||||
[ 'Applying MODERN theme'] );
|
||||
|
||||
run('HMR should detect a missing or inaccessible options file',
|
||||
[
|
||||
'build',
|
||||
'doesntmatter.json',
|
||||
'to',
|
||||
'dontcare.all',
|
||||
'--options',
|
||||
"test/scripts/hmr-options-nonexistent.json",
|
||||
"-t",
|
||||
"modern"
|
||||
],
|
||||
[ 'The specified options file is missing or inaccessible'] );
|
||||
|
||||
run('HMR should detect an invalid or malformed options file',
|
||||
[
|
||||
'build',
|
||||
'doesntmatter.json',
|
||||
'to',
|
||||
'dontcare.all',
|
||||
'--options',
|
||||
"test/scripts/hmr-options-broken.json",
|
||||
"-t",
|
||||
"modern"
|
||||
],
|
||||
[ 'The specified options file is invalid'] );
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user