zarm
Version:
基于 React 的移动端UI库
12 lines (10 loc) • 1.14 kB
JavaScript
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
var _templateObject;
import isImage from '../../utils/isImage';
describe('isImage', function () {
it.each(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mime | expected\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n ", " | ", "\n "])), 'image/gif', true, 'image/png', true, 'image/jpeg', true, 'image/bmp', true, 'image/webp', true, 'image/x-icon', true, 'image/vnd.microsoft.icon', true, 'text/plain', false, 'text/html', false, 'text/css', false, 'text/javascript', false, 'audio/midi', false, 'video/webm', false)('$mime is image: $expected', function (_ref) {
var mime = _ref.mime,
expected = _ref.expected;
expect(isImage(mime)).toEqual(expected);
});
});