Skip to content

Commit

Permalink
Update svg-sprite.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and Kreeg committed Feb 16, 2022
1 parent 409963f commit b68a246
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions test/svg-sprite.test.js
Expand Up @@ -180,10 +180,14 @@ describe('svg-sprite', () => {
const previewTemplate = fs.readFileSync(path.join(__dirname, 'tmpl/css.html'), 'utf-8');

describe('with no arguments', () => {
const spriter = new SVGSpriter({
shape: {
dest: 'svg'
}
let spriter;

beforeEach(() => {
spriter = new SVGSpriter({
shape: {
dest: 'svg'
}
});
});

describe('with no SVG files', () => {
Expand All @@ -200,12 +204,6 @@ describe('svg-sprite', () => {
});

describe(`with ${weather.length} SVG files`, () => {
const spriter = new SVGSpriter({
shape: {
dest: 'svg'
}
});

it(`returns ${weather.length} optimized shapes`, done => {
addFixtureFiles(spriter, weather, cwdWeather);
spriter.compile((error, result, data) => {
Expand All @@ -222,12 +220,6 @@ describe('svg-sprite', () => {
});

describe(`with ${weather.length} relative path SVG files`, () => {
const spriter = new SVGSpriter({
shape: {
dest: 'svg'
}
});

it(`returns ${weather.length} optimized shapes`, done => {
addFixtureFiles(spriter, weather, cwdWeather, false);
spriter.compile((error, result, data) => {
Expand Down

0 comments on commit b68a246

Please sign in to comment.