mirror of
https://github.com/status-im/actions-hugo.git
synced 2025-01-13 14:25:07 +00:00
test: Add test for extended option (#134)
This commit is contained in:
parent
8323a17f96
commit
6281061c0d
@ -32,6 +32,16 @@ describe('Integration testing run()', () => {
|
||||
expect(result.output).toMatch(`Hugo Static Site Generator v${testVersion}`);
|
||||
});
|
||||
|
||||
test('succeed in installing a custom extended version', async () => {
|
||||
const testVersion = Tool.TestVersionSpec;
|
||||
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
||||
process.env['INPUT_EXTENDED'] = 'true';
|
||||
const result: main.ActionResult = await main.run();
|
||||
expect(result.exitcode).toBe(0);
|
||||
expect(result.output).toMatch(`Hugo Static Site Generator v${testVersion}`);
|
||||
expect(result.output).toMatch(`extended`);
|
||||
});
|
||||
|
||||
test('succeed in installing the latest version', async () => {
|
||||
const testVersion = 'latest';
|
||||
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
||||
@ -44,6 +54,21 @@ describe('Integration testing run()', () => {
|
||||
`Hugo Static Site Generator v${Tool.TestVersionLatest}`
|
||||
);
|
||||
});
|
||||
|
||||
test('succeed in installing the latest extended version', async () => {
|
||||
const testVersion = 'latest';
|
||||
process.env['INPUT_HUGO-VERSION'] = testVersion;
|
||||
process.env['INPUT_EXTENDED'] = 'true';
|
||||
nock('https://formulae.brew.sh')
|
||||
.get(`/api/formula/${Tool.Repo}.json`)
|
||||
.reply(200, jsonTestBrew);
|
||||
const result: main.ActionResult = await main.run();
|
||||
expect(result.exitcode).toBe(0);
|
||||
expect(result.output).toMatch(
|
||||
`Hugo Static Site Generator v${Tool.TestVersionLatest}`
|
||||
);
|
||||
expect(result.output).toMatch(`extended`);
|
||||
});
|
||||
});
|
||||
|
||||
describe('showVersion()', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user