Skip to content

Commit

Permalink
Merge branch 'next' into convert-to-esm
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Sep 17, 2023
2 parents f3fd70b + f40e217 commit 6b79bae
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 6b79bae

Please sign in to comment.