mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-18 00:57:51 +02:00
34 lines
947 B
TypeScript
34 lines
947 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import {getFileLoaderUtils} from '../webpackUtils';
|
|
|
|
describe('getFileLoaderUtils()', () => {
|
|
it('plugin svgo/removeViewBox and removeTitle should be disabled', () => {
|
|
const {oneOf} = getFileLoaderUtils().rules.svg();
|
|
expect(oneOf[0].use).toContainEqual(
|
|
expect.objectContaining({
|
|
loader: require.resolve('@svgr/webpack'),
|
|
options: expect.objectContaining({
|
|
svgoConfig: {
|
|
plugins: [
|
|
{
|
|
name: 'preset-default',
|
|
params: {
|
|
overrides: {
|
|
removeTitle: false,
|
|
removeViewBox: false,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
}),
|
|
);
|
|
});
|
|
});
|