Skip to content

Commit

Permalink
Merge branch 'next' into drop-node-v14-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Sep 17, 2023
2 parents 8dce787 + f40e217 commit 8c769be
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/docs/versions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
import { execSync } from 'node:child_process';
import * as semver from 'semver';
import { describe, expect, it } from 'vitest';
import { oldVersions } from '../../docs/.vitepress/versions';

describe('docs versions', () => {
function isFakerOrigin(): boolean {
try {
const originUrl = execSync('git remote get-url origin')
.toString('utf8')
.trim();
return (
originUrl === '[email protected]:faker-js/faker' ||
originUrl === '[email protected]:faker-js/faker.git' ||
originUrl === 'https://github.com/faker-js/faker' ||
originUrl === 'https://github.com/faker-js/faker.git'
);
} catch {
return false;
}
}

describe.runIf(isFakerOrigin())('docs versions', () => {
describe('oldVersions', () => {
it('should have a complete set of oldVersions', () => {
expect(oldVersions.length).toBeGreaterThanOrEqual(2);
Expand Down

0 comments on commit 8c769be

Please sign in to comment.