mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 13:01:13 +00:00
f2ad77f90a
Reviewed By: sophiebits Differential Revision: D7196607 fbshipit-source-id: 9e6452f583b2b5616f5bb38f26f2ae33c14bb820
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @emails oncall+javascript_foundation
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const getHeadersInFolder = require('../../ios/getHeadersInFolder');
|
|
|
|
describe('ios::getHeadersInFolder', () => {
|
|
xit('should return an array of all headers in given folder', () => {
|
|
jest.setMock({
|
|
'FileA.h': '',
|
|
'FileB.h': '',
|
|
});
|
|
|
|
const foundHeaders = getHeadersInFolder(process.cwd());
|
|
|
|
expect(foundHeaders.length).toBe(2);
|
|
|
|
getHeadersInFolder(process.cwd()).forEach(headerPath => {
|
|
expect(headerPath).to.contain(process.cwd());
|
|
});
|
|
});
|
|
|
|
xit('should ignore all headers in Pods, Examples & node_modules', () => {
|
|
jest.setMock({
|
|
'FileA.h': '',
|
|
'FileB.h': '',
|
|
Pods: {
|
|
'FileC.h': '',
|
|
},
|
|
Examples: {
|
|
'FileD.h': '',
|
|
},
|
|
node_modules: {
|
|
'FileE.h': '',
|
|
},
|
|
});
|
|
|
|
expect(getHeadersInFolder(process.cwd()).length).to.equals(2);
|
|
});
|
|
});
|