From 8899f682b89abd0590250404d015be3ffdcd9cc9 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 15 Feb 2021 02:41:28 +0300 Subject: [PATCH] Remove coverage imports from tests --- test/coa/_index.js | 4 +--- test/config/_index.js | 4 +--- test/jsapi/_index.js | 8 ++------ test/plugins/_index.js | 4 +--- test/svg2js/_index.js | 16 ++++------------ test/svgo/_index.js | 4 +--- 6 files changed, 10 insertions(+), 30 deletions(-) diff --git a/test/coa/_index.js b/test/coa/_index.js index 11f6a8dcd..da248fa36 100644 --- a/test/coa/_index.js +++ b/test/coa/_index.js @@ -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'), diff --git a/test/config/_index.js b/test/config/_index.js index e223fd565..3242db1bc 100644 --- a/test/config/_index.js +++ b/test/config/_index.js @@ -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() { diff --git a/test/jsapi/_index.js b/test/jsapi/_index.js index d4b72f60c..d85640a69 100644 --- a/test/jsapi/_index.js +++ b/test/jsapi/_index.js @@ -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() { diff --git a/test/plugins/_index.js b/test/plugins/_index.js index 5460a29cd..4b740c734 100644 --- a/test/plugins/_index.js +++ b/test/plugins/_index.js @@ -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() { diff --git a/test/svg2js/_index.js b/test/svg2js/_index.js index 886c99e50..56d50b12a 100644 --- a/test/svg2js/_index.js +++ b/test/svg2js/_index.js @@ -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() { diff --git a/test/svgo/_index.js b/test/svgo/_index.js index fccbb9f7c..541894fc3 100644 --- a/test/svgo/_index.js +++ b/test/svgo/_index.js @@ -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() {