Skip to content

Commit

Permalink
[Misc] Add vitest on all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelleduc committed Dec 31, 2024
1 parent 13c0b8f commit 8070b58
Show file tree
Hide file tree
Showing 167 changed files with 2,523 additions and 89 deletions.
4 changes: 3 additions & 1 deletion core/alerts/alerts-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"vue": "3.5.13"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"typescript": "5.6.3",
"vite": "6.0.3"
},
Expand Down
25 changes: 25 additions & 0 deletions core/alerts/alerts-api/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
6 changes: 4 additions & 2 deletions core/alerts/alerts-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-api": "workspace:*",
"@xwiki/cristal-alerts-api": "workspace:*",
"@xwiki/cristal-api": "workspace:*",
"inversify": "6.2.0",
"pinia": "2.3.0",
"vue": "3.5.13"
Expand All @@ -32,6 +33,7 @@
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
Expand Down
25 changes: 25 additions & 0 deletions core/alerts/alerts-default/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
4 changes: 3 additions & 1 deletion core/alerts/alerts-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"main": "./src/index.ts",
"scripts": {
"build": "vue-tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-alerts-api": "workspace:*",
Expand All @@ -33,6 +34,7 @@
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3",
Expand Down
25 changes: 25 additions & 0 deletions core/alerts/alerts-ui/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
4 changes: 3 additions & 1 deletion core/attachments/attachments-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-authentication-api": "workspace:*",
"@xwiki/cristal-model-api": "workspace:*",
"vue": "3.5.13"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"typescript": "5.6.3",
"vite": "6.0.3"
},
Expand Down
25 changes: 25 additions & 0 deletions core/attachments/attachments-api/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
4 changes: 3 additions & 1 deletion core/attachments/attachments-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-attachments-api": "workspace:*",
Expand All @@ -36,6 +37,7 @@
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
Expand Down
25 changes: 25 additions & 0 deletions core/attachments/attachments-default/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
3 changes: 2 additions & 1 deletion core/attachments/attachments-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"main": "./src/index.ts",
"scripts": {
"build": "vue-tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-alerts-api": "workspace:*",
Expand Down
4 changes: 3 additions & 1 deletion core/authentication/authentication-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"clean": "rimraf dist",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
Expand Down
25 changes: 25 additions & 0 deletions core/authentication/authentication-api/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
4 changes: 3 additions & 1 deletion core/authentication/authentication-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"clean": "rimraf dist",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-api": "workspace:*",
Expand All @@ -31,6 +32,7 @@
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
Expand Down
25 changes: 25 additions & 0 deletions core/authentication/authentication-default/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
4 changes: 3 additions & 1 deletion core/authentication/authentication-nextcloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"clean": "rimraf dist",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"typescript": "5.6.3",
"vite": "6.0.3"
},
Expand Down
25 changes: 25 additions & 0 deletions core/authentication/authentication-nextcloud/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* See the LICENSE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import localConfig from "./vite.config";
import { mergeConfig } from "vitest/config";
import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";

export default mergeConfig(defaultConfig, localConfig);
4 changes: 3 additions & 1 deletion core/authentication/authentication-xwiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"clean": "rimraf dist",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"test": "vitest --run"
},
"dependencies": {
"@xwiki/cristal-api": "workspace:*",
Expand All @@ -34,6 +35,7 @@
},
"devDependencies": {
"@types/js-cookie": "3.0.6",
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
Expand Down
Loading

0 comments on commit 8070b58

Please sign in to comment.