Skip to content

Commit

Permalink
Merge pull request #2 from Smittyvb/fix-emitcss-test
Browse files Browse the repository at this point in the history
Fix emitCss test
  • Loading branch information
non25 authored Jan 13, 2021
2 parents 066e6f3 + 9de14d8 commit a68fde7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions test/loader.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ describe('loader', () => {

const callbackSpy = spy(cb);

const nameParts = fileName.split(/[/\\]/g);

loader.call(
{
cacheable: cacheableSpy,
async: () => callbackSpy,
resourcePath: fileName,
version,
query
query,
resourcePath: fileName,
resource: nameParts[nameParts.length - 1],
},
fileContents,
null
Expand Down Expand Up @@ -210,6 +213,19 @@ describe('loader', () => {
);
});

it(
'should configure emitCss=true',
testLoader(
'test/fixtures/css.html',
function(err, code, map) {
expect(err).not.to.exist;

expect(code).to.match(/!=!svelte-loader\?cssPath=/);
},
{ emitCss: true }
)
);

describe('preprocess', () => {
it('should preprocess successfully', done => {
testLoader(
Expand Down

0 comments on commit a68fde7

Please sign in to comment.