From f6ddf36e130fb6d87cebad351057643441c3d173 Mon Sep 17 00:00:00 2001 From: dizzy Date: Tue, 5 Oct 2021 15:26:16 -0700 Subject: [Vue] migrate periods service to typescript & introduce frontend unit testing for vue & migrate periods.spec.js (#18092) * initial periods service conversion * get period service migration to compile * getLastNRange was public static * fix an issue, switch angularjs tests to use chrome headless and hope it works * remove phantomjs requirement * get vue unit testing to work w/ jest (only option right now, the mocha plugin is not compatible w/ vue 3 and no one is working on making it compatible) * more test code * progress * more progress * more progress, single passing test * finish converting periods.spec.js and get test to pass * remove use of any in periods service and rebuilt corehome * add missing file headers * fix run-once.sh * debug travis build * remove debugging code & update submodule * update submodule * more travis debugging * install npm dependencies in "install-ubuntu.sh" * use latest node * try this again * typos * more debugging * more debugging * testing something * testing something else * testing something else * testing something else * testing something else * testing something else * testing something else * testing something else * testing something else * testing something else * testing something else * revert travis.yml changes * update some expected screenshots * releasechecklisttest fix --- package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 7ce0ccd893..f45cd6334c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "tests" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "test": "TZ=UTC vue-cli-service test:unit", "eslint": "eslint" }, "repository": { @@ -27,6 +27,8 @@ }, "homepage": "https://github.com/matomo-org/matomo#readme", "dependencies": { + "@types/jquery": "^3.5.6", + "@types/jqueryui": "^1.12.16", "angular": "^1.8.2", "angular-animate": "^1.8.2", "angular-cookies": "^1.8.2", @@ -52,11 +54,13 @@ }, "devDependencies": { "@types/angular": "^1.8.2", + "@types/jest": "^26.0.24", "@typescript-eslint/eslint-plugin": "^4.29.3", "@typescript-eslint/parser": "^4.29.3", "@vue/cli-plugin-babel": "^4.5.13", "@vue/cli-plugin-eslint": "^4.5.13", "@vue/cli-plugin-typescript": "^4.5.13", + "@vue/cli-plugin-unit-jest": "^4.5.13", "@vue/cli-service": "^4.5.13", "@vue/compiler-sfc": "^3.2.6", "@vue/eslint-config-airbnb": "^5.3.0", @@ -65,6 +69,8 @@ "eslint": "^6.8.0", "eslint-plugin-import": "^2.24.2", "eslint-plugin-vue": "^7.16.0", - "typescript": "^4.3.5" + "ts-jest": "^26.5.6", + "typescript": "^4.3.5", + "vue-jest": "^5.0.0-0" } } -- cgit v1.2.3