Skip to content

Commit

Permalink
Migrate to vue 3
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <[email protected]>
  • Loading branch information
raimund-schluessler committed Aug 19, 2023
1 parent 639d20d commit 4822a17
Show file tree
Hide file tree
Showing 76 changed files with 2,696 additions and 2,897 deletions.
11 changes: 6 additions & 5 deletions cypress/component/modal.cy.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import { mount } from 'cypress/vue2'
import { mount } from 'cypress/vue'
import NcModal from '../../src/components/NcModal/NcModal.vue'
import type { Component } from 'vue'
import { h } from 'vue'

describe('NcModal', () => {
it('close button is visible when content is scrolled', () => {
mount(NcModal, {
propsData: {
props: {
show: true,
size: 'small',
name: 'Name',
},
slots: {
// Create two div as children, first is 100vh = overflows the content, second just gets some data attribute so we can scroll into view
default: {
render: (h) =>
render: () =>
h('div', [
h('div', { style: 'height: 100vh;' }),
h('div', { attrs: { 'data-cy': 'bottom' } }),
h('div', { style: { height: '100vh' } }),
h('div', { 'data-cy': 'bottom' }),
]),
} as Component,
},
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// https://on.cypress.io/configuration
// ***********************************************************

import './commands'
import { mount } from '@cypress/vue2'
import './commands.ts'
import { mount } from '@cypress/vue'

// Augment the Cypress namespace to include type definitions for
// your custom command.
Expand Down
7 changes: 6 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
*/

const ignorePatterns = [
'@ckpack/vue-color',
'ansi-regex',
'bail',
'char-regex',
'character-*',
'comma-separated-tokens',
'decode-named-character-reference',
'devlop', // ESM dependency of unified
Expand Down Expand Up @@ -56,13 +58,16 @@ module.exports = {
],

testEnvironment: 'jsdom',
testEnvironmentOptions: {
customExportConditions: ["node", "node-addons"],
},
setupFilesAfterEnv: [
'./tests/setup.js',
],

transform: {
'^.+\\.(j|t)s$': 'babel-jest',
'^.+\\.vue$': '@vue/vue2-jest',
'^.+\\.vue$': '@vue/vue3-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
transformIgnorePatterns: [
Expand Down
Loading

0 comments on commit 4822a17

Please sign in to comment.