Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion js-api-spec/legacy/importer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''};
Expand All @@ -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');
Expand Down