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