xref: /expo/packages/@expo/config-plugins/src/utils/__tests__/plugin-resolver-test.ts (revision 0502d1f9)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import { moduleNameIsDirectFileReference } from '../plugin-resolver';
2
3describe(moduleNameIsDirectFileReference, () => {
4  it('file path', () => {
5    expect(moduleNameIsDirectFileReference('./app')).toBe(true);
6    expect(moduleNameIsDirectFileReference('~/app')).toBe(true);
7    expect(moduleNameIsDirectFileReference('/app')).toBe(true);
8    expect(moduleNameIsDirectFileReference('.')).toBe(true);
9  });
10  it('module', () => {
11    expect(moduleNameIsDirectFileReference('app')).toBe(false);
12    expect(moduleNameIsDirectFileReference('@expo/app')).toBe(false);
13  });
14  it('module folder', () => {
15    expect(moduleNameIsDirectFileReference('app/')).toBe(true);
16    expect(moduleNameIsDirectFileReference('@expo/app/')).toBe(true);
17  });
18  it('module file', () => {
19    expect(moduleNameIsDirectFileReference('app/index.js')).toBe(true);
20    expect(moduleNameIsDirectFileReference('@expo/app/index')).toBe(true);
21  });
22});
23

served by {OpenGrok

Last Index Update: Tue Oct 21 18:42:31 GMT 2025