Skip to content

Commit

Permalink
Remove coverage imports from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Feb 14, 2021
1 parent a1c1b7f commit 8899f68
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 30 deletions.
4 changes: 1 addition & 3 deletions test/coa/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

const fs = require('fs'),
{ Command } = require('commander'),
svgo = require(process.env.COVERAGE ?
'../../lib-cov/svgo/coa.js' :
'../../lib/svgo/coa.js'),
svgo = require('../../lib/svgo/coa.js'),
path = require('path'),
svgPath = path.resolve(__dirname, 'test.svg'),
svgFolderPath = path.resolve(__dirname, 'testSvg'),
Expand Down
4 changes: 1 addition & 3 deletions test/config/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

const { expect } = require('chai');

var CONFIG = require(process.env.COVERAGE ?
'../../lib-cov/svgo/config' :
'../../lib/svgo/config');
var CONFIG = require('../../lib/svgo/config');

describe('config', function() {

Expand Down
8 changes: 2 additions & 6 deletions test/jsapi/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

const { expect } = require('chai');

var SVGO = require(process.env.COVERAGE ?
'../../lib-cov/svgo.js' :
'../../lib/svgo.js');
var SVGO = require('../../lib/svgo.js');

var JSAPI = require(process.env.COVERAGE ?
'../../lib-cov/svgo/jsAPI.js' :
'../../lib/svgo/jsAPI.js');
var JSAPI = require('../../lib/svgo/jsAPI.js');

describe('svgo object', function() {

Expand Down
4 changes: 1 addition & 3 deletions test/plugins/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ var FS = require('fs'),
EOL = require('os').EOL,
regEOL = new RegExp(EOL, 'g'),
regFilename = /^(.*)\.(\d+)\.svg$/,
SVGO = require(process.env.COVERAGE ?
'../../lib-cov/svgo':
'../../lib/svgo');
SVGO = require('../../lib/svgo');

describe('plugins tests', function() {

Expand Down
16 changes: 4 additions & 12 deletions test/svg2js/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@ const { expect } = require('chai');

var FS = require('fs'),
PATH = require('path'),
JSAPI = require(process.env.COVERAGE ?
'../../lib-cov/svgo/jsAPI' :
'../../lib/svgo/jsAPI'),
CSSClassList = require(process.env.COVERAGE ?
'../../lib-cov/svgo/css-class-list' :
'../../lib/svgo/css-class-list'),
CSSStyleDeclaration = require(process.env.COVERAGE ?
'../../lib-cov/svgo/css-style-declaration' :
'../../lib/svgo/css-style-declaration'),
SVG2JS = require(process.env.COVERAGE ?
'../../lib-cov/svgo/svg2js' :
'../../lib/svgo/svg2js');
JSAPI = require('../../lib/svgo/jsAPI'),
CSSClassList = require('../../lib/svgo/css-class-list'),
CSSStyleDeclaration = require('../../lib/svgo/css-style-declaration'),
SVG2JS = require('../../lib/svgo/svg2js');

describe('svg2js', function() {

Expand Down
4 changes: 1 addition & 3 deletions test/svgo/_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ var FS = require('fs'),
PATH = require('path'),
EOL = require('os').EOL,
regEOL = new RegExp(EOL, 'g'),
SVGO = require(process.env.COVERAGE ?
'../../lib-cov/svgo':
'../../lib/svgo');
SVGO = require('../../lib/svgo');

describe('indentation', function() {

Expand Down

0 comments on commit 8899f68

Please sign in to comment.