Skip to content

Commit

Permalink
test(v3): fix cypress and vitest config
Browse files Browse the repository at this point in the history
Remove the type "module" from the package json to avoid issues with cypress
  • Loading branch information
diegoazh committed Mar 29, 2024
1 parent cbba278 commit d4b265a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions packages/v3/cypress/runner/components/ClusterTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
// to use with `pnpm run dev` import from '../../../src/main'
// to use with `pnpm run test:e2e` import from '../../../dist/main.es'
// to use with `pnpm run test:e2e:ci` import from '../../../dist/main.es'
import { components } from '../../../dist/main.es';
const { Cluster } = components;
import { Cluster } from '../../../dist/main.es';
export default {
data() {
Expand Down
4 changes: 1 addition & 3 deletions packages/v3/cypress/runner/components/MapTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
</template>

<script>
import { composables } from '../../../dist/main.es';
const { useMapPromise } = composables;
import { useMapPromise } from '../../../dist/main.es';
export default {
name: 'MapTest',
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions packages/v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@gmap-vue/v3",
"version": "1.0.3",
"description": "This is a google map component for Vue.js, updated for Vue 2 compatibility",
"type": "module",
"main": "dist/main.umd.js",
"module": "dist/main.es.js",
"typings": "dist/types/src/main.d.ts",
Expand Down Expand Up @@ -104,8 +103,8 @@
"coverage": "vitest run --coverage",
"test:e2e": "cypress install && start-server-and-test test:e2e:vite:server http://localhost:4173/ 'pnpm exec cypress open --e2e'",
"test:e2e:ci": "start-server-and-test test:e2e:vite:server http://localhost:4173/ 'pnpm exec cypress run --e2e'",
"test:e2e:build": "pnpm run build && vite build --config cypress/runner/vite.config.js",
"test:e2e:preview": "vite preview --config cypress/runner/vite.config.js",
"test:e2e:build": "pnpm run build && vite build --config cypress/runner/vite.config.mjs",
"test:e2e:preview": "vite preview --config cypress/runner/vite.config.mjs",
"test:e2e:vite:server": "pnpm run test:e2e:build && pnpm run test:e2e:preview",
"test:e2e:node:server": "pnpm run test:e2e:build && node cypress/runner/runner.cjs",
"lint": "prettier --write ./src && eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
Expand Down
2 changes: 1 addition & 1 deletion packages/v3/tsconfig.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"include": ["vite.config.mts", "vitest.config.mts", "cypress.config.*"],
"compilerOptions": {
"composite": true,
"types": ["node"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export default defineConfig({
},
},
test: {
deps: {
external: ['google.maps'],
server: {
deps: {
external: ['google.maps'],
},
},
environment: 'happy-dom', // or 'jsdom', 'node'
coverage: {
Expand Down

0 comments on commit d4b265a

Please sign in to comment.