]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: fix tests names
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 1 May 2019 15:26:25 +0000 (17:26 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 1 May 2019 15:26:25 +0000 (17:26 +0200)
__tests__/guards/component-beforeRouteEnter.spec.js
__tests__/guards/global-beforeEach.spec.js
__tests__/guards/route-beforeEnter.spec.js
package.json

index 98f116211fdca0c2ced1e234a167aaa70d235c6a..4c865c98dee211c40decfacdfbda61910ae80415 100644 (file)
@@ -39,7 +39,7 @@ beforeEach(() => {
   beforeRouteEnter.mockReset()
 })
 
-describe('navigation guards', () => {
+describe('beforeRouteEnter', () => {
   beforeAll(() => {
     // TODO: move to utils for tests that need DOM
     const dom = new JSDOM(
index b2fdfda010e2a717c5e4e2328a08feaa41211182..006558d8df4543ee55b703a49c8db0671d773f7d 100644 (file)
@@ -27,7 +27,7 @@ const routes = [
   { path: '/foo', component: Foo },
 ]
 
-describe('navigation guards', () => {
+describe('router.beforeEach', () => {
   beforeAll(() => {
     // TODO: move to utils for tests that need DOM
     const dom = new JSDOM(
index 54ab13433488f9e3dd1c97c0af12bf33d3e121ff..219585c85c295346fa6bda160b944f746159dc6e 100644 (file)
@@ -33,7 +33,7 @@ const routes = [
   },
 ]
 
-describe('navigation guards', () => {
+describe('beforeEnter', () => {
   beforeAll(() => {
     // TODO: move to utils for tests that need DOM
     const dom = new JSDOM(
index 854f695b5bdccf7d67e76e5cd40c71d04c862310..ca8164fbcb6c3f7aa4a5806a58e681b3089e454e 100644 (file)
@@ -6,8 +6,8 @@
   "license": "MIT",
   "scripts": {
     "test:unit": "jest --coverage",
-    "test:mocha": "mocha -r ts-node/register __tests__/**/*.spec.js",
-    "test:mocha:dev": "yarn run test:mocha -w --extension ts",
+    "test:mocha": "NODE_ENV=test mocha -r ts-node/register __tests__/**/*.spec.js __tests__/*.spec.js",
+    "test:mocha:dev": "yarn run test:mocha -w --extension ts --reporter min",
     "test:mocha:cov": "nyc -r lcov -e .ts -x \"*.spec.ts\" mocha -r ts-node/register __tests__/**/*.spec.ts && nyc report",
     "test": "yarn run test:unit",
     "dev": "webpack-dev-server --mode=development"