@@ -326,6 +326,20 @@ describe("loader", () => {
326326 expect ( getErrors ( stats ) ) . toMatchSnapshot ( "errors" ) ;
327327 } ) ;
328328
329+ // eslint-disable-next-line jest/no-commented-out-tests
330+ // it('should delegate resolving (LESS) imports with URLs to "less" package', async () => {
331+ // const testId = "./import-keyword-url.less";
332+ // const compiler = getCompiler(testId);
333+ // const stats = await compile(compiler);
334+ // const codeFromBundle = getCodeFromBundle(stats, compiler);
335+ // const codeFromLess = await getCodeFromLess(testId);
336+ //
337+ // expect(codeFromBundle.css).toBe(codeFromLess.css);
338+ // expect(codeFromBundle.css).toMatchSnapshot("css");
339+ // expect(getWarnings(stats)).toMatchSnapshot("warnings");
340+ // expect(getErrors(stats)).toMatchSnapshot("errors");
341+ // });
342+
329343 it ( "should allow to import non-less files" , async ( ) => {
330344 const testId = "./import-non-less.less" ;
331345 const compiler = getCompiler ( testId ) ;
@@ -667,6 +681,29 @@ describe("loader", () => {
667681 expect ( getErrors ( stats ) ) . toMatchSnapshot ( "errors" ) ;
668682 } ) ;
669683
684+ // eslint-disable-next-line jest/no-commented-out-tests
685+ // it("should not add to dependencies imports with URLs", async () => {
686+ // const testId = "./import-url-deps.less";
687+ // const compiler = getCompiler(testId);
688+ // const stats = await compile(compiler);
689+ // const codeFromBundle = getCodeFromBundle(stats, compiler);
690+ // const codeFromLess = await getCodeFromLess(testId);
691+ // const { fileDependencies } = stats.compilation;
692+ //
693+ // validateDependencies(fileDependencies);
694+ //
695+ // Array.from(fileDependencies).forEach((item) => {
696+ // ["http", "https"].forEach((protocol) => {
697+ // expect(item.includes(protocol)).toBe(false);
698+ // });
699+ // });
700+ //
701+ // expect(codeFromBundle.css).toBe(codeFromLess.css);
702+ // expect(codeFromBundle.css).toMatchSnapshot("css");
703+ // expect(getWarnings(stats)).toMatchSnapshot("warnings");
704+ // expect(getErrors(stats)).toMatchSnapshot("errors");
705+ // });
706+
670707 it ( "should add path to dependencies" , async ( ) => {
671708 // Create the file with absolute path
672709 const file = path . resolve ( __dirname , "fixtures" , "generated-3.less" ) ;
0 commit comments