UNPKG

react-native

Version:

A framework for building native apps using React

26 lines (19 loc) 634 B
jest.autoMockOff(); const findPackageClassName = require('../../android/findPackageClassName'); const mockFs = require('mock-fs'); const mocks = require('../../__fixtures__/android'); describe('android::findPackageClassName', () => { beforeAll(() => mockFs({ empty: {}, flat: { android: mocks.valid, }, })); it('should return manifest content if file exists in the folder', () => { expect(typeof findPackageClassName('flat')).toBe('string'); }); it('should return `null` if there\'s no matches', () => { expect(findPackageClassName('empty')).toBe(null); }); afterAll(mockFs.restore); });