Skip to content

Commit

Permalink
fix: check element match snapshot instead of wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Aug 28, 2024
1 parent a41873d commit e8d3972
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 49,710 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: pnpm lint

- name: Run formatter
run: pnpm format
run: pnpm format

- name: Run unit tests
run: pnpm run test:unit
Expand Down
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
declare module '*.svg?component' {
const value: string;
export default value;
}
}
declare module '*.vue';
2 changes: 1 addition & 1 deletion src/components/Footer/WFooter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ describe('WFooter', () => {
}
})

expect(wrapper).toMatchSnapshot()
expect(wrapper.element).toMatchSnapshot()
})
})
4 changes: 2 additions & 2 deletions src/components/Footer/WFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
import AdoIcon from '@/assets/svg/ado.svg?component'
import WitOracleIcon from '@/assets/svg/witnet-logo-dark.svg?component'
import { FooterSection } from './WFooter.ts'
import LicenseText from './LicenseText.vue'
import WSection from '../Section/WSection.vue'
import LicenseText from '@/components/Footer/LicenseText.vue'
import WSection from '@/components/Section/WSection.vue'
import { PropType } from 'vue'
const ADO_URL = 'https://github.com/adoracles/'
Expand Down
49,961 changes: 256 additions & 49,705 deletions src/components/Footer/__snapshots__/WFooter.spec.ts.snap

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export default mergeConfig(
defineConfig({
test: {
environment: 'jsdom',
snapshotFormat: {
printBasicPrototype: true
},
exclude: [...configDefaults.exclude, 'e2e/**'],
root: fileURLToPath(new URL('./', import.meta.url))
}
Expand Down

0 comments on commit e8d3972

Please sign in to comment.