You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2025-07-03 13:26:38 -04:00
print Hugo version & environment variables in tests
This commit is contained in:
@ -5,11 +5,18 @@
|
||||
const assert = require('assert');
|
||||
const binCheck = require('bin-check');
|
||||
const hugoBin = require('..');
|
||||
const { execFile } = require('child_process');
|
||||
|
||||
describe('hugo-bin', () => {
|
||||
it('should return path to binary and work', () => {
|
||||
return binCheck(hugoBin, ['version']).then(works => {
|
||||
assert(works);
|
||||
});
|
||||
it('Hugo exists and runs?', () => {
|
||||
return binCheck(hugoBin, ['version']).then(works => {
|
||||
assert(works);
|
||||
|
||||
// Print additional build environment variables if check successful
|
||||
if (works) {
|
||||
execFile(hugoBin, ['env'], (error, stdout) => {
|
||||
if (error) throw error;
|
||||
console.log(stdout);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user