|
682 | 682 | }) |
683 | 683 |
|
684 | 684 | describe('Orientation', function () { |
685 | | - it('Should keep the orientation', function (done) { |
| 685 | + it('Keep the orientation', function (done) { |
686 | 686 | expect( |
687 | 687 | loadImage( |
688 | 688 | blobGIF, |
|
696 | 696 | ).to.be.ok |
697 | 697 | }) |
698 | 698 |
|
699 | | - it('Should rotate left', function (done) { |
| 699 | + it('Rotate left', function (done) { |
700 | 700 | expect( |
701 | 701 | loadImage( |
702 | 702 | blobGIF, |
|
710 | 710 | ).to.be.ok |
711 | 711 | }) |
712 | 712 |
|
713 | | - it('Should rotate right', function (done) { |
| 713 | + it('Rotate right', function (done) { |
714 | 714 | expect( |
715 | 715 | loadImage( |
716 | 716 | blobGIF, |
|
724 | 724 | ).to.be.ok |
725 | 725 | }) |
726 | 726 |
|
727 | | - it('Should adjust constraints to new coordinates', function (done) { |
| 727 | + it('Adjust constraints to new coordinates', function (done) { |
728 | 728 | expect( |
729 | 729 | loadImage( |
730 | 730 | blobGIF, |
|
738 | 738 | ).to.be.ok |
739 | 739 | }) |
740 | 740 |
|
741 | | - it('Should adjust left and top to new coordinates', function (done) { |
| 741 | + it('Adjust left and top to new coordinates', function (done) { |
742 | 742 | expect( |
743 | 743 | loadImage( |
744 | 744 | blobGIF, |
|
752 | 752 | ).to.be.ok |
753 | 753 | }) |
754 | 754 |
|
755 | | - it('Should adjust right and bottom to new coordinates', function (done) { |
| 755 | + it('Adjust right and bottom to new coordinates', function (done) { |
756 | 756 | expect( |
757 | 757 | loadImage( |
758 | 758 | blobGIF, |
|
766 | 766 | ).to.be.ok |
767 | 767 | }) |
768 | 768 |
|
769 | | - it('Should adjust left and bottom to new coordinates', function (done) { |
| 769 | + it('Adjust left and bottom to new coordinates', function (done) { |
770 | 770 | expect( |
771 | 771 | loadImage( |
772 | 772 | blobGIF, |
|
780 | 780 | ).to.be.ok |
781 | 781 | }) |
782 | 782 |
|
783 | | - it('Should adjust right and top to new coordinates', function (done) { |
| 783 | + it('Adjust right and top to new coordinates', function (done) { |
784 | 784 | expect( |
785 | 785 | loadImage( |
786 | 786 | blobGIF, |
|
794 | 794 | ).to.be.ok |
795 | 795 | }) |
796 | 796 |
|
797 | | - it('Should rotate left with the given pixelRatio', function (done) { |
| 797 | + it('Rotate left with the given pixelRatio', function (done) { |
798 | 798 | expect( |
799 | 799 | loadImage( |
800 | 800 | blobGIF, |
|
810 | 810 | ).to.be.ok |
811 | 811 | }) |
812 | 812 |
|
813 | | - it('Should rotate right with the given pixelRatio', function (done) { |
| 813 | + it('Rotate right with the given pixelRatio', function (done) { |
814 | 814 | expect( |
815 | 815 | loadImage( |
816 | 816 | blobGIF, |
|
826 | 826 | ).to.be.ok |
827 | 827 | }) |
828 | 828 |
|
829 | | - it('Should ignore too small orientation value', function (done) { |
| 829 | + it('Ignore too small orientation value', function (done) { |
830 | 830 | expect( |
831 | 831 | loadImage( |
832 | 832 | blobGIF, |
|
840 | 840 | ).to.be.ok |
841 | 841 | }) |
842 | 842 |
|
843 | | - it('Should ignore too large orientation value', function (done) { |
| 843 | + it('Ignore too large orientation value', function (done) { |
844 | 844 | expect( |
845 | 845 | loadImage( |
846 | 846 | blobGIF, |
|
854 | 854 | ).to.be.ok |
855 | 855 | }) |
856 | 856 |
|
857 | | - it('Should rotate right based on the exif orientation value', function (done) { |
| 857 | + it('Rotate right based on the exif orientation value', function (done) { |
858 | 858 | expect( |
859 | 859 | loadImage( |
860 | 860 | blobJPEG, |
|
906 | 906 | ).to.be.ok |
907 | 907 | }) |
908 | 908 |
|
909 | | - it('Should scale image after exif based orientation', function (done) { |
| 909 | + it('Scale image after exif based orientation', function (done) { |
910 | 910 | expect( |
911 | 911 | loadImage( |
912 | 912 | blobJPEG, |
|
923 | 923 | describe('from-image', function () { |
924 | 924 | if (!loadImage.orientation) return |
925 | 925 |
|
926 | | - it('Should use automatic browser image orientation', function (done) { |
| 926 | + it('Use automatic browser image orientation', function (done) { |
927 | 927 | expect( |
928 | 928 | loadImage( |
929 | 929 | blobJPEG, |
|
1005 | 1005 | }) |
1006 | 1006 |
|
1007 | 1007 | describe('Metadata', function () { |
1008 | | - it('Should parse Exif tags', function (done) { |
| 1008 | + it('Parse Exif tags', function (done) { |
1009 | 1009 | loadImage.parseMetaData(blobJPEG, function (data) { |
1010 | 1010 | expect(data.exif).to.be.ok |
1011 | 1011 | expect(data.exif.get('Orientation')).to.equal(6) |
1012 | 1012 | done() |
1013 | 1013 | }) |
1014 | 1014 | }) |
1015 | 1015 |
|
1016 | | - it('Should not parse Exif tags if disabled', function (done) { |
| 1016 | + it('Do not parse Exif tags if disabled', function (done) { |
1017 | 1017 | loadImage.parseMetaData( |
1018 | 1018 | blobJPEG, |
1019 | 1019 | function (data) { |
|
1024 | 1024 | ) |
1025 | 1025 | }) |
1026 | 1026 |
|
1027 | | - it('Should parse Exif tag offsets', function (done) { |
| 1027 | + it('Parse Exif tag offsets', function (done) { |
1028 | 1028 | loadImage.parseMetaData(blobJPEG, function (data) { |
1029 | 1029 | expect(data.exifOffsets).to.be.ok |
1030 | 1030 | expect(data.exifOffsets.get('Orientation')).to.equal(0x16) |
|
1034 | 1034 | }) |
1035 | 1035 | }) |
1036 | 1036 |
|
1037 | | - it('Should not parse Exif tag offsets if disabled', function (done) { |
| 1037 | + it('Do not parse Exif tag offsets if disabled', function (done) { |
1038 | 1038 | loadImage.parseMetaData( |
1039 | 1039 | blobJPEG, |
1040 | 1040 | function (data) { |
|
1045 | 1045 | ) |
1046 | 1046 | }) |
1047 | 1047 |
|
1048 | | - it('Should only parse included Exif tags', function (done) { |
| 1048 | + it('Only parse included Exif tags', function (done) { |
1049 | 1049 | loadImage.parseMetaData( |
1050 | 1050 | blobJPEG, |
1051 | 1051 | function (data) { |
|
1065 | 1065 | ) |
1066 | 1066 | }) |
1067 | 1067 |
|
1068 | | - it('Should not parse excluded Exif tags', function (done) { |
| 1068 | + it('Do not parse excluded Exif tags', function (done) { |
1069 | 1069 | loadImage.parseMetaData( |
1070 | 1070 | blobJPEG, |
1071 | 1071 | function (data) { |
|
1085 | 1085 | ) |
1086 | 1086 | }) |
1087 | 1087 |
|
1088 | | - it('Should parse IPTC tags', function (done) { |
| 1088 | + it('Parse IPTC tags', function (done) { |
1089 | 1089 | loadImage.parseMetaData(blobJPEG, function (data) { |
1090 | 1090 | expect(data.iptc).to.be.ok |
1091 | 1091 | expect(data.iptc.get('ObjectName')).to.equal('blueimp.net') |
1092 | 1092 | done() |
1093 | 1093 | }) |
1094 | 1094 | }) |
1095 | 1095 |
|
1096 | | - it('Should not parse IPTC tags if disabled', function (done) { |
| 1096 | + it('Do not parse IPTC tags if disabled', function (done) { |
1097 | 1097 | loadImage.parseMetaData( |
1098 | 1098 | blobJPEG, |
1099 | 1099 | function (data) { |
|
1104 | 1104 | ) |
1105 | 1105 | }) |
1106 | 1106 |
|
1107 | | - it('Should parse IPTC tag offsets', function (done) { |
| 1107 | + it('Parse IPTC tag offsets', function (done) { |
1108 | 1108 | loadImage.parseMetaData(blobJPEG, function (data) { |
1109 | 1109 | expect(data.iptcOffsets).to.be.ok |
1110 | 1110 | expect(data.iptcOffsets.get('ObjectName')).to.equal(0x44) |
1111 | 1111 | done() |
1112 | 1112 | }) |
1113 | 1113 | }) |
1114 | 1114 |
|
1115 | | - it('Should not parse IPTC tag offsets if disabled', function (done) { |
| 1115 | + it('Do not parse IPTC tag offsets if disabled', function (done) { |
1116 | 1116 | loadImage.parseMetaData( |
1117 | 1117 | blobJPEG, |
1118 | 1118 | function (data) { |
|
1123 | 1123 | ) |
1124 | 1124 | }) |
1125 | 1125 |
|
1126 | | - it('Should only parse included IPTC tags', function (done) { |
| 1126 | + it('Only parse included IPTC tags', function (done) { |
1127 | 1127 | loadImage.parseMetaData( |
1128 | 1128 | blobJPEG, |
1129 | 1129 | function (data) { |
|
1145 | 1145 | ) |
1146 | 1146 | }) |
1147 | 1147 |
|
1148 | | - it('Should not parse excluded IPTC tags', function (done) { |
| 1148 | + it('Do not parse excluded IPTC tags', function (done) { |
1149 | 1149 | loadImage.parseMetaData( |
1150 | 1150 | blobJPEG, |
1151 | 1151 | function (data) { |
|
1167 | 1167 | ) |
1168 | 1168 | }) |
1169 | 1169 |
|
1170 | | - it('Should parse the complete image head', function (done) { |
| 1170 | + it('Parse the complete image head', function (done) { |
1171 | 1171 | loadImage.parseMetaData(blobJPEG, function (data) { |
1172 | 1172 | expect(data.imageHead).to.be.ok |
1173 | 1173 | loadImage.parseMetaData( |
|
1181 | 1181 | }) |
1182 | 1182 | }) |
1183 | 1183 |
|
1184 | | - it('Should not parse the complete image head if disabled', function (done) { |
| 1184 | + it('Do not parse the complete image head if disabled', function (done) { |
1185 | 1185 | loadImage.parseMetaData( |
1186 | 1186 | blobJPEG, |
1187 | 1187 | function (data) { |
|
1192 | 1192 | ) |
1193 | 1193 | }) |
1194 | 1194 |
|
1195 | | - it('Should parse meta data automatically', function (done) { |
| 1195 | + it('Parse meta data automatically', function (done) { |
1196 | 1196 | expect( |
1197 | 1197 | loadImage( |
1198 | 1198 | blobJPEG, |
|
1210 | 1210 | ).to.be.ok |
1211 | 1211 | }) |
1212 | 1212 |
|
1213 | | - it('Should write Exif Orientation tag and replace image head', function (done) { |
| 1213 | + it('Write Exif Orientation tag and replace image head', function (done) { |
1214 | 1214 | loadImage( |
1215 | 1215 | blobJPEG, |
1216 | 1216 | function (img, data) { |
|
1253 | 1253 | return |
1254 | 1254 | } |
1255 | 1255 |
|
1256 | | - it('Should fetch image URL as blob if meta option is true', function (done) { |
| 1256 | + it('Fetch image URL as blob if meta option is true', function (done) { |
1257 | 1257 | expect( |
1258 | 1258 | loadImage( |
1259 | 1259 | // IE does not allow XMLHttpRequest access to data URLs, |
|
1273 | 1273 | ).to.be.ok |
1274 | 1274 | }) |
1275 | 1275 |
|
1276 | | - it('Should load image URL as img if meta option is false', function (done) { |
| 1276 | + it('Load image URL as img if meta option is false', function (done) { |
1277 | 1277 | expect( |
1278 | 1278 | loadImage(imageUrlJPEG, function (img, data) { |
1279 | 1279 | expect(data.imageHead).to.be.undefined |
|
0 commit comments