Skip to content

Commit 1f6874e

Browse files
committed
updating tests
1 parent abd66f4 commit 1f6874e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/config-generator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ describe('The config-generator function', () => {
904904

905905
const actualConfig = configGenerator(config);
906906

907-
const imagesRule = findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp)$/, actualConfig.module.rules).oneOf[1];
907+
const imagesRule = findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp|avif)$/, actualConfig.module.rules).oneOf[1];
908908
expect(imagesRule.type).to.equal('asset/resource');
909909
expect(imagesRule.generator).to.eql({ filename: 'file.[hash][ext]' });
910910
});
@@ -921,7 +921,7 @@ describe('The config-generator function', () => {
921921

922922
const actualConfig = configGenerator(config);
923923

924-
const imagesRule = findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp)$/, actualConfig.module.rules).oneOf[1];
924+
const imagesRule = findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp|avif)$/, actualConfig.module.rules).oneOf[1];
925925
expect(imagesRule.parser).to.eql({ dataUrlCondition: { maxSize: 3000 } });
926926
});
927927

@@ -937,7 +937,7 @@ describe('The config-generator function', () => {
937937
const actualConfig = configGenerator(config);
938938

939939
expect(function() {
940-
findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp)$/, actualConfig.module.rules);
940+
findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp|avif)$/, actualConfig.module.rules);
941941
}).to.throw();
942942
});
943943
});
@@ -1229,7 +1229,7 @@ describe('The config-generator function', () => {
12291229
});
12301230

12311231
const webpackConfig = configGenerator(config);
1232-
const rule = findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp)$/, webpackConfig.module.rules).oneOf[1];
1232+
const rule = findRule(/\.(png|jpg|jpeg|gif|ico|svg|webp|avif)$/, webpackConfig.module.rules).oneOf[1];
12331233

12341234
expect(rule.generator.filename).to.equal('dirname-images/[hash:42][ext]');
12351235
});

0 commit comments

Comments
 (0)