Skip to content
Snippets Groups Projects
Unverified Commit 2288ce03 authored by Gabriel-Ladzaretti's avatar Gabriel-Ladzaretti Committed by GitHub
Browse files

test(versioning/ubuntu): Fix test failing due to new release rolling out (#15210)

parent d9bbc181
No related branches found
No related tags found
No related merge requests found
import { DateTime, Settings } from 'luxon';
import { api as ubuntu } from '.';
describe('modules/versioning/ubuntu/index', () => {
const dt = DateTime.fromISO('2022-04-20');
afterEach(() => {
jest.resetAllMocks();
});
test.each`
version | expected
${undefined} | ${false}
......@@ -147,6 +154,7 @@ describe('modules/versioning/ubuntu/index', () => {
${'19.10'} | ${false}
${'20.04'} | ${true}
${'20.10'} | ${false}
${'22.04'} | ${false}
${'42.01'} | ${false}
${'42.02'} | ${false}
${'42.03'} | ${false}
......@@ -159,7 +167,6 @@ describe('modules/versioning/ubuntu/index', () => {
${'42.10'} | ${false}
${'42.11'} | ${false}
${'2020.04'} | ${false}
${'22.04'} | ${false}
${'warty'} | ${false}
${'hoary'} | ${false}
${'breezy'} | ${false}
......@@ -197,6 +204,7 @@ describe('modules/versioning/ubuntu/index', () => {
${'impish'} | ${false}
${'jammy'} | ${false}
`('isStable("$version") === $expected', ({ version, expected }) => {
jest.spyOn(Settings, 'now').mockReturnValue(dt.valueOf());
expect(ubuntu.isStable(version)).toBe(expected);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment