diff --git a/test/fixtures/less/folder/nested.less b/test/fixtures/less/folder/nested.less new file mode 100644 index 00000000..b3a4999a --- /dev/null +++ b/test/fixtures/less/folder/nested.less @@ -0,0 +1,3 @@ +.nested-import { + background: coral; +} diff --git a/test/fixtures/less/import-nested.less b/test/fixtures/less/import-nested.less new file mode 100644 index 00000000..311a3003 --- /dev/null +++ b/test/fixtures/less/import-nested.less @@ -0,0 +1,5 @@ +.top-import { + background: red; +} + +@import "folder/nested.less"; diff --git a/test/index.test.js b/test/index.test.js index 9d2bd7cc..e6875aa7 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -37,6 +37,10 @@ test('should resolve all imports', async () => { await compileAndCompare('import'); }); +test('should resolve nested imports', async () => { + await compileAndCompare('import-nested'); +}); + test('should fail when passed incorrect configuration', async () => { await expect( compileAndCompare('basic', {