xref: /expo/docs/common/routes.test.ts (revision 8efbb7ac)
1import { isReferencePath } from '~/common/routes';
2
3describe(isReferencePath, () => {
4  it('returns true for unversioned pathname', () => {
5    expect(isReferencePath('/versions/unversioned')).toBe(true);
6  });
7
8  it('returns true for sdk pathname', () => {
9    expect(isReferencePath('/versions/latest/sdk/notifications')).toBe(true);
10  });
11
12  it('returns true for react-native pathname', () => {
13    expect(isReferencePath('/versions/v44.0.0/react-native/stylesheet/')).toBe(true);
14  });
15
16  it('returns false for non-versioned pathname', () => {
17    expect(isReferencePath('/build-reference/how-tos/')).toBe(false);
18  });
19});
20