Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps #24

Merged
merged 13 commits into from
Mar 15, 2024
893 changes: 482 additions & 411 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,37 @@
"update:vue-devtools": "rimraf ./node_modules/your-app-name-devtools-5 && npm install"
},
"dependencies": {
"express": "^4.18.2"
"express": "^4.18.3"
},
"devDependencies": {
"@babel/eslint-parser": "^7.23.3",
"@babel/eslint-parser": "^7.23.10",
"@pinia/testing": "^0.1.3",
"@vitejs/plugin-vue": "^4.5.0",
"@vitest/coverage-v8": "^0.34.6",
"@vue/test-utils": "^2.4.2",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.3.1",
"@vue/test-utils": "^2.4.5",
"concurrently": "^8.2.2",
"eslint": "^8.54.0",
"eslint": "^8.57.0",
"eslint-config-tjw-base": "^2.0.0",
"eslint-config-tjw-import": "^1.0.0",
"eslint-config-tjw-jest": "^2.0.0",
"eslint-config-tjw-vue": "^3.0.0",
"eslint-import-resolver-webpack": "^0.13.8",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vuejs-accessibility": "^2.2.0",
"happy-dom": "^12.10.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-vue": "^9.23.0",
"eslint-plugin-vuejs-accessibility": "^2.2.1",
"happy-dom": "^13.8.4",
"jest-serializer-vue-tjw": "^3.20.0",
"nw": "0.82.0-sdk",
"nw-vue-devtools-5": "^5.0.0",
"nwjs-builder-phoenix": "^1.15.0",
"pinia": "^2.1.6",
"pinia": "^2.1.7",
"rimraf": "^5.0.5",
"vite": "^5.0.2",
"vitest": "^0.34.6",
"vue": "^3.3.9",
"vite": "^5.1.6",
"vitest": "^1.3.1",
"vue": "^3.4.21",
"vue-options-api-constants-plugin": "^1.0.1",
"vue-router": "^4.2.5",
"vue-router": "^4.3.0",
"wait-on": "^7.2.0"
},
"chromium-args": "--enable-spell-checking --load-extension='./node_modules/nw-vue-devtools-5/extension' --disable-features=ProcessPerSiteUpToMainFrameThreshold",
Expand Down
2 changes: 2 additions & 0 deletions server.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* c8 ignore start */
const express = require('express');

const app = express();
app.use(express.static('./dist-vue'));
app.listen(4185);
/* c8 ignore stop */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example server stub, ignoring for test coverage as it's the most basic express usage possible, so no need to deal with mocking this for tests, and it is simple specifically so people can easily replace it. Adding c8 ignores so they can more easily add coverage to the server.js if it has more custom logic.

2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import App from '@/App.vue';

import '@/assets/main.css';

const app = createApp(App);
export const app = createApp(App);
applyPrototypes(app.config.globalProperties);
app.use(createPinia());
app.use(router);
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/main.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { app } from '@/main.js';

describe('main.js', () => {
test('Creates Vue app', () => {
expect(app?._component?.name)
.toEqual('App');
});
});
2 changes: 2 additions & 0 deletions tests/unit/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import vueSnapshotSerializer from './serializer.js';

expect.addSnapshotSerializer(vueSnapshotSerializer);

global.document = global.window.document;
document.body.innerHTML = '<div id="app"></div>';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that main.js is being tested we need to mock out #app so it can mount to something without throwing an error.

const { getComputedStyle } = window;

// Prevents console log message to install Vue DevTools
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable import/no-unused-modules */
/* eslint-disable import/no-unused-modules,import/no-extraneous-dependencies */
import { fileURLToPath, URL } from 'node:url';

import vue from '@vitejs/plugin-vue';
Expand Down
Loading