Skip to content

Commit

Permalink
chore: fix tests for Svelte 4
Browse files Browse the repository at this point in the history
This will fail the builds for Svelte 3 on master temporarily, but should make ecosystem-ci runs against the version-4 branch green
  • Loading branch information
dummdidumm committed May 22, 2023
1 parent 652a861 commit 7657b52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"svelte": "^3.0.0"
},
"peerDependencies": {
"svelte": ">3.0.0"
"svelte": "^3.0.0 || ^4.0.0"
},
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions test/loader.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('loader', () => {
expect(map).to.exist;

// es2015 statements remain
expect(code).to.contain(`import { hello } from "./utils";`);
expect(code).to.contain(`import { hello } from './utils';`);
})
);

Expand All @@ -135,7 +135,7 @@ describe('loader', () => {
expect(err).not.to.exist;

// es2015 statements remain
expect(code).to.contain(`import Nested from "./nested";`);
expect(code).to.contain(`import Nested from './nested';`);

expect(code).to.exist;
expect(map).to.exist;
Expand All @@ -149,7 +149,7 @@ describe('loader', () => {
'should configure css (default)',
testLoader('test/fixtures/css.html', function(err, code, map) {
expect(err).not.to.exist;
expect(code).to.contain('function add_css()');
expect(code).to.contain('function add_css(target)');
})
);

Expand All @@ -159,7 +159,7 @@ describe('loader', () => {
'test/fixtures/css.html',
function(err, code, map) {
expect(err).not.to.exist;
expect(code).not.to.contain('function add_css()');
expect(code).not.to.contain('function add_css(target)');
},
{ compilerOptions: { css: false } }
)
Expand Down

0 comments on commit 7657b52

Please sign in to comment.