Skip to content

Commit a23cf6f

Browse files
RTLcoileitanp461
authored andcommitted
Angular: Unit Test for gravity:auto (#99)
1 parent b9e86f1 commit a23cf6f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports = function (config) {
8686
"/app/": appAssets
8787
},
8888

89-
exclude: [],
89+
exclude: ['node_modules/**/*spec.js', 'node_modules/**/*spec.ts'],
9090
preprocessors: {},
9191
// disabled HtmlReporter; suddenly crashing w/ strange socket error
9292
reporters: ['progress', 'kjhtml'],//'html'],

src/cloudinary-image.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('CloudinaryImage', () => {
5050
@Component({
5151
template: `<cl-image responsive id="image1" public-id="responsive_sample.jpg">
5252
<cl-transformation width="300" crop="scale" overlay="text:roboto_25_bold:SDK"></cl-transformation>
53-
<cl-transformation effect="art:hokusai"></cl-transformation>
53+
<cl-transformation effect="art:hokusai" gravity="auto"></cl-transformation>
5454
<cl-transformation fetch-format="auto"></cl-transformation>
5555
</cl-image>`
5656
})
@@ -74,9 +74,9 @@ describe('CloudinaryImage', () => {
7474
it('creates an img element which encodes the directive attributes to the URL', () => {
7575
const img = des.children[0].nativeElement as HTMLImageElement;
7676
expect(img.src).toEqual(jasmine.stringMatching
77-
(/c_scale,l_text:roboto_25_bold:SDK,w_300\/e_art:hokusai\/f_auto\/responsive_sample.jpg/));
77+
(/c_scale,l_text:roboto_25_bold:SDK,w_300\/e_art:hokusai,g_auto\/f_auto\/responsive_sample.jpg/));
7878
expect(img.attributes.getNamedItem('data-src').value).toEqual(jasmine.stringMatching(
79-
/c_scale,l_text:roboto_25_bold:SDK,w_300\/e_art:hokusai\/f_auto\/responsive_sample.jpg/));
79+
/c_scale,l_text:roboto_25_bold:SDK,w_300\/e_art:hokusai,g_auto\/f_auto\/responsive_sample.jpg/));
8080
});
8181
});
8282

0 commit comments

Comments
 (0)