Skip to content

Commit fea3cc4

Browse files
committed
Update test/index.js
1 parent 44c78e9 commit fea3cc4

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

test/index.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,35 @@ import { suite } from 'uvu';
55
import hugoBin from '../index.js';
66
import hugoLib from '../lib/index.js';
77

8+
const worksSuite = suite('hugo-bin works');
89

9-
const hugoLibWorksSuite = suite('hugo-bin works');
10-
11-
hugoLibWorksSuite('should return path to binary and work', async () => {
10+
worksSuite('should return path to binary and work', async () => {
1211
const works = await binCheck(hugoBin, ['version']);
1312
assert.equal(works, true);
1413
});
1514

16-
hugoLibWorksSuite.run();
15+
worksSuite.run();
1716

1817
/**
1918
* Verify Custom/Enterprise Repository overwrite.
2019
*/
2120

22-
const hugoLibCustomRepoTestSuite = suite('hugo-bin overwrite download repository');
21+
const customRepoSuite = suite('hugo-bin overwrite download repository');
2322

24-
hugoLibCustomRepoTestSuite.before.each(() => {
23+
customRepoSuite.before.each(() => {
2524
// Ensure that the environment is cleaned before next test run.
2625
delete process.env.npm_config_hugo_bin_build_tags;
2726
delete process.env.npm_config_hugo_bin_download_repo;
2827
});
2928

30-
hugoLibCustomRepoTestSuite('verify test env', () => {
29+
customRepoSuite('verify test env', () => {
3130
assert.equal(process.env.npm_config_hugo_bin_build_tags, undefined);
3231
assert.equal(process.env.npm_config_hugo_bin_download_repo, undefined);
3332
});
3433

3534
// Default Repository - Test Cases
3635

37-
hugoLibCustomRepoTestSuite('should return default repository url - Repository: default - Extended: undefined', async () => {
36+
customRepoSuite('should return default repository url - Repository: default - Extended: undefined', async () => {
3837
const lib = await hugoLib(process.cwd());
3938
const repoSources = lib._src.map((v) => v.url);
4039

@@ -43,7 +42,7 @@ hugoLibCustomRepoTestSuite('should return default repository url - Repository: d
4342
}
4443
});
4544

46-
hugoLibCustomRepoTestSuite('should return default repository url - Repository: default - Extended: empty', async () => {
45+
customRepoSuite('should return default repository url - Repository: default - Extended: empty', async () => {
4746
process.env.npm_config_hugo_bin_build_tags = '';
4847
const lib = await hugoLib(process.cwd());
4948
const repoSources = lib._src.map((v) => v.url);
@@ -53,7 +52,7 @@ hugoLibCustomRepoTestSuite('should return default repository url - Repository: d
5352
}
5453
});
5554

56-
hugoLibCustomRepoTestSuite('should return default repository url - Repository: default - Extended: extended', async () => {
55+
customRepoSuite('should return default repository url - Repository: default - Extended: extended', async () => {
5756
process.env.npm_config_hugo_bin_build_tags = 'extended';
5857
const lib = await hugoLib(process.cwd());
5958
const repoSources = lib._src.map((v) => v.url);
@@ -65,7 +64,7 @@ hugoLibCustomRepoTestSuite('should return default repository url - Repository: d
6564

6665
// Custom/Enterprise Repository Test Cases
6766

68-
hugoLibCustomRepoTestSuite('should return custom repository url - Repository: custom - Extended: undefined', async () => {
67+
customRepoSuite('should return custom repository url - Repository: custom - Extended: undefined', async () => {
6968
process.env.npm_config_hugo_bin_download_repo = 'https://some1.example.com';
7069
const lib = await hugoLib(process.cwd());
7170
const repoSources = lib._src.map((v) => v.url);
@@ -75,7 +74,7 @@ hugoLibCustomRepoTestSuite('should return custom repository url - Repository: cu
7574
}
7675
});
7776

78-
hugoLibCustomRepoTestSuite('should return custom repository url - Repository: custom - Extended: empty', async () => {
77+
customRepoSuite('should return custom repository url - Repository: custom - Extended: empty', async () => {
7978
process.env.npm_config_hugo_bin_build_tags = '';
8079
process.env.npm_config_hugo_bin_download_repo = 'https://some2.example.com';
8180
const lib = await hugoLib(process.cwd());
@@ -86,7 +85,7 @@ hugoLibCustomRepoTestSuite('should return custom repository url - Repository: cu
8685
}
8786
});
8887

89-
hugoLibCustomRepoTestSuite('should return custom repository url - Repository: custom - Extended: extended', async () => {
88+
customRepoSuite('should return custom repository url - Repository: custom - Extended: extended', async () => {
9089
process.env.npm_config_hugo_bin_build_tags = 'extended';
9190
process.env.npm_config_hugo_bin_download_repo = 'https://some3.example.com';
9291
const lib = await hugoLib(process.cwd());
@@ -97,4 +96,4 @@ hugoLibCustomRepoTestSuite('should return custom repository url - Repository: cu
9796
}
9897
});
9998

100-
hugoLibCustomRepoTestSuite.run();
99+
customRepoSuite.run();

0 commit comments

Comments
 (0)