diff --git a/js-api-spec/legacy/importer.test.ts b/js-api-spec/legacy/importer.test.ts index 01b66554aa..9daf5ec0aa 100644 --- a/js-api-spec/legacy/importer.test.ts +++ b/js-api-spec/legacy/importer.test.ts @@ -439,7 +439,7 @@ describe('the imported URL', () => { }); // Regression test for sass/dart-sass#1137. - it("isn't changed if it's root-relative", () => { + it("isn't changed if it's root-relative with no nesting", () => { const importer = jest.fn(url => { expect(url).toBe('/foo'); return {contents: ''}; @@ -449,6 +449,17 @@ describe('the imported URL', () => { expect(importer).toHaveBeenCalled(); }); + // Regression test for sass/embedded-host-node#1137. + it("isn't changed if it's root-relative with nesting", () => { + const importer = jest.fn(url => { + expect(url).toBe('/foo/bar/baz'); + return {contents: ''}; + }); + + sass.renderSync({data: '@import "/foo/bar/baz"', importer}); + expect(importer).toHaveBeenCalled(); + }); + it("is converted to a file: URL if it's an absolute Windows path", () => { const importer = jest.fn(url => { expect(url).toBe('file:///C:/foo');