Skip to content

Commit e96a40a

Browse files
committed
Add a spec for an empty importer list in the legacy API.
1 parent b4d51f3 commit e96a40a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

js-api-spec/legacy/importer.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,24 @@ describe('import precedence:', () => {
8787
).toEqualIgnoringWhitespace('a { from: cwd; }')
8888
);
8989
}));
90+
91+
// Regression test for embedded host.
92+
it('falls back to load path if imports list is empty', () =>
93+
sandbox(dir => {
94+
dir.write({
95+
'test.scss': 'a {from: load path}',
96+
});
97+
98+
expect(
99+
sass
100+
.renderSync({
101+
data: '@import "test"',
102+
includePaths: [dir.root],
103+
importer: [],
104+
})
105+
.css.toString()
106+
).toEqualIgnoringWhitespace('a { from: load path; }')
107+
}));
90108
});
91109
});
92110

0 commit comments

Comments
 (0)