1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-04-26 21:38:26 -04:00
hugo-extended/test/index.js
Jake Jarvis 6c87e415dc
allow binaries in vendor folder to be cached
aka: don't delete binaries in node_modules folder, since they shouldn't change anyways (unless the package is also updated)
2020-02-18 17:40:51 -05:00

26 lines
556 B
JavaScript

/* eslint-env mocha */
'use strict';
const assert = require('assert');
const binCheck = require('bin-check');
const hugoBin = require('..');
const { execFile } = require('child_process');
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);
});
}
});
});