react-native
Version:
A framework for building native apps using React
37 lines (29 loc) • 852 B
JavaScript
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* All rights reserved.
*
* @emails oncall+javascript_foundation
*/
;
const groupFilesByType = require('../groupFilesByType');
describe('groupFilesByType', () => {
it('should group files by its type', () => {
const fonts = [
'fonts/a.ttf',
'fonts/b.ttf',
];
const images = [
'images/a.jpg',
'images/c.jpeg',
];
const groupedFiles = groupFilesByType(fonts.concat(images));
expect(groupedFiles.font).toEqual(fonts);
expect(groupedFiles.image).toEqual(images);
});
});