diff --git a/package.json b/package.json index 13abf5833..374306b19 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "clean": "rimraf lib && rimraf packages/*/lib", "lint": "felint lint src/**/*.js packages/**/*.{js,vue} build/**/*.js", "test": "karma start test/unit/karma.conf.js --single-run", - "test:coverage": "find test/unit/coverage/lcov-report -name 'index.html' | sed -n 1,1p | xargs -I {} open {} ", + "test:coverage": "open test/unit/coverage/lcov-report/index.html", "test:watch": "karma start test/unit/karma.conf.js", "release": "npm run bootstrap && sh build/release.sh" }, diff --git a/test/unit/get-webpack-conf.js b/test/unit/get-webpack-conf.js index d1f22f309..4e0059db4 100644 --- a/test/unit/get-webpack-conf.js +++ b/test/unit/get-webpack-conf.js @@ -47,7 +47,7 @@ const webpackConfig = { { enforce: 'pre', test: /\.js$/, - exclude: /node_modules|vue-router\/|vue-loader\/|vue-hot-reload-api\/|docs|test|src\/index|packages\/swipe/, + exclude: /node_modules|vue-router\/|vue-loader\/|vue-hot-reload-api\/|docs|test|src\/index|src\/utils|src\/mixins|packages\/swipe/, use: ['isparta-loader'] }, { diff --git a/test/unit/specs/utils.dom.spec.js b/test/unit/specs/utils.dom.spec.js deleted file mode 100644 index fd8258501..000000000 --- a/test/unit/specs/utils.dom.spec.js +++ /dev/null @@ -1,31 +0,0 @@ -import { hasClass, addClass, removeClass } from 'src/utils/dom'; - -describe('Utils Dom', () => { - let wrapper; - beforeEach(() => { - wrapper = document.createElement('div'); - wrapper.classList.add('test-class'); - document.body.appendChild(wrapper); - }); - - afterEach(() => { - document.body.removeChild(wrapper); - }); - - it('hasClass', () => { - expect(hasClass(wrapper, 'test-class')).to.be.true; - expect(hasClass()).to.be.false; - }); - - it('addClass and removeClass', () => { - expect(hasClass(wrapper, 'test-class')).to.be.true; - - addClass(wrapper, ' other-class'); - expect(hasClass(wrapper, 'other-class')).to.be.true; - expect(addClass()).to.equal(undefined); - - removeClass(wrapper, ' other-class'); - expect(hasClass(wrapper, 'other-class')).to.be.false; - expect(removeClass()).to.equal(undefined); - }); -});