1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2026-06-12 08:45:27 -04:00

Rename variables

This commit is contained in:
XhmikosR
2023-05-17 08:15:38 +03:00
parent 1e4307eaf9
commit e69a92ad0e
5 changed files with 19 additions and 18 deletions
+9 -9
View File
@@ -2,13 +2,13 @@ import process from 'node:process';
import binCheck from 'bin-check';
import { suite } from 'uvu';
import * as assert from 'uvu/assert'; // eslint-disable-line n/file-extension-in-import
import hugoBin from '../index.js';
import hugoLib from '../lib/index.js';
import hugoPath from '../index.js';
import hugoBin from '../lib/index.js';
const worksSuite = suite('works');
worksSuite('should return path to binary and work', async() => {
const works = await binCheck(hugoBin, ['version']);
const works = await binCheck(hugoPath, ['version']);
assert.is(works, true);
});
@@ -32,7 +32,7 @@ customRepoSuite('verify test env', () => {
// Default Repository - Test Cases
customRepoSuite('should return default repository url - Repository: default - Extended: undefined', async() => {
const lib = await hugoLib(process.cwd());
const lib = await hugoBin(process.cwd());
const repoSources = lib._src.map(v => v.url);
for (const sourceUrl of repoSources) {
@@ -42,7 +42,7 @@ customRepoSuite('should return default repository url - Repository: default - Ex
customRepoSuite('should return default repository url - Repository: default - Extended: empty', async() => {
process.env.npm_config_hugo_bin_build_tags = '';
const lib = await hugoLib(process.cwd());
const lib = await hugoBin(process.cwd());
const repoSources = lib._src.map(v => v.url);
for (const sourceUrl of repoSources) {
@@ -52,7 +52,7 @@ customRepoSuite('should return default repository url - Repository: default - Ex
customRepoSuite('should return default repository url - Repository: default - Extended: extended', async() => {
process.env.npm_config_hugo_bin_build_tags = 'extended';
const lib = await hugoLib(process.cwd());
const lib = await hugoBin(process.cwd());
const repoSources = lib._src.map(v => v.url);
for (const sourceUrl of repoSources) {
@@ -63,7 +63,7 @@ customRepoSuite('should return default repository url - Repository: default - Ex
// Custom/Enterprise Repository Test Cases
customRepoSuite('should return custom repository url - Repository: custom - Extended: undefined', async() => {
process.env.npm_config_hugo_bin_download_repo = 'https://some1.example.com';
const lib = await hugoLib(process.cwd());
const lib = await hugoBin(process.cwd());
const repoSources = lib._src.map(v => v.url);
for (const sourceUrl of repoSources) {
@@ -74,7 +74,7 @@ customRepoSuite('should return custom repository url - Repository: custom - Exte
customRepoSuite('should return custom repository url - Repository: custom - Extended: empty', async() => {
process.env.npm_config_hugo_bin_build_tags = '';
process.env.npm_config_hugo_bin_download_repo = 'https://some2.example.com';
const lib = await hugoLib(process.cwd());
const lib = await hugoBin(process.cwd());
const repoSources = lib._src.map(v => v.url);
for (const sourceUrl of repoSources) {
@@ -85,7 +85,7 @@ customRepoSuite('should return custom repository url - Repository: custom - Exte
customRepoSuite('should return custom repository url - Repository: custom - Extended: extended', async() => {
process.env.npm_config_hugo_bin_build_tags = 'extended';
process.env.npm_config_hugo_bin_download_repo = 'https://some3.example.com';
const lib = await hugoLib(process.cwd());
const lib = await hugoBin(process.cwd());
const repoSources = lib._src.map(v => v.url);
for (const sourceUrl of repoSources) {