diff --git a/src/components/__tests__/VueTechsLogos.spec.ts b/src/components/__tests__/VueTechsLogos.spec.ts new file mode 100644 index 0000000..261b9ba --- /dev/null +++ b/src/components/__tests__/VueTechsLogos.spec.ts @@ -0,0 +1,20 @@ +import { describe, it, expect } from 'vitest' + +import { mount } from '@vue/test-utils' +import VueTechsLogos from '../VueTechsLogos.vue' +import { techs } from './mock' + +describe('VueTechsLogos', () => { + it('renders properly', () => { + const wrapper = mount(VueTechsLogos, { props: { name: 'vue', label: 'Test Vue' } }) + expect(wrapper.text()).toContain('Vue') + expect(wrapper.text()).toContain('Test Vue') + }) + it('renders properly', () => { + const wrapper = mount(VueTechsLogos) + + for(let item of techs) { + expect(wrapper.text()).toContain(item.name) + } + }) +}) diff --git a/src/components/__tests__/mock.ts b/src/components/__tests__/mock.ts new file mode 100644 index 0000000..d40c5cb --- /dev/null +++ b/src/components/__tests__/mock.ts @@ -0,0 +1,53 @@ +export const techs = [ + { name: 'Android', url: 'https://www.android.com' }, + { name: 'Apple', url: 'https://www.apple.com' }, + { name: 'Linux', url: 'https://ubuntu.com' }, + { name: 'Microsoft', url: 'https://www.microsoft.com' }, + { name: 'PlayStore', url: 'https://play.google.com' }, + { name: 'PWA', url: 'https://web.dev/progressive-web-apps' }, + { name: 'HTML', url: 'https://developer.mozilla.org/en-US/docs/Glossary/HTML5' }, + { name: 'CSS', url: 'https://developer.mozilla.org/en-US/docs/Glossary/CSS' }, + { name: 'JavaScript', url: 'https://developer.mozilla.org/en-US/docs/Glossary/Javascript' }, + { name: 'Typescript', url: 'https://www.typescriptlang.org/docs' }, + { name: 'Node', url: 'https://nodejs.org/en' }, + { name: 'Java', url: 'https://www.java.com' }, + { name: 'Ruby', url: 'https://www.ruby-lang.org/en' }, + { name: 'Python', url: 'https://docs.python.org' }, + { name: 'Swift', url: 'https://developer.apple.com/swift' }, + { name: 'PHP', url: 'https://www.php.net' }, + { name: 'C#', url: 'https://learn.microsoft.com/en-us/dotnet/csharp' }, + { name: 'C++', url: 'https://learn.microsoft.com/en-us/dotnet/csharp' }, + { name: 'VisualCode', url: 'https://code.visualstudio.com' }, + { name: 'Github', url: 'https://github.com/criar-art' }, + { name: 'NPM', url: 'npmjs.com/package/vue-techs-logos' }, + { name: 'YouTube', url: 'https://youtube.com' }, + { name: 'Wordpress', url: 'https://wordpress.com' }, + { name: 'Tumblr', url: 'https://www.tumblr.com' }, + { name: 'CodePen', url: 'https://codepen.io' }, + { name: 'Vue', url: 'https://vuejs.org' }, + { name: 'React', url: 'https://reactjs.org' }, + { name: 'Angular', url: 'https://angular.io' }, + { name: 'Svelte', url: 'https://svelte.dev' }, + { name: 'Ember', url: 'https://emberjs.com' }, + { name: 'Stylus', url: 'https://stylus-lang.com' }, + { name: 'Tailwind', url: 'https://tailwindcss.com' }, + { name: 'Less', url: 'https://lesscss.org' }, + { name: 'Sass', url: 'https://sass-lang.com' }, + { name: 'Webpack', url: 'https://webpack.js.org' }, + { name: 'Vite', url: 'https://vitejs.dev' }, + { name: 'Gulp', url: 'https://gulpjs.com' }, + { name: 'Jest', url: 'https://jestjs.io/pt-BR' }, + { name: 'Karma', url: 'https://karma-runner.github.io' }, + { name: 'Vitest', url: 'https://vitest.dev' }, + { name: 'Xcode', url: 'https://developer.apple.com/xcode' }, + { name: 'Whatsapp', url: 'https://web.whatsapp.com' }, + { name: 'Telegram', url: 'https://web.telegram.org' }, + { name: 'Cypress', url: 'https://www.cypress.io' }, + { name: 'Mozilla', url: 'https://www.mozilla.org' }, + { name: 'Safari', url: 'https://www.apple.com/br/safari' }, + { name: 'Edge', url: 'https://www.microsoft.com/pt-br/edge' }, + { name: 'Chrome', url: 'https://www.google.com/intl/pt-BR/chrome' }, + { name: 'MySQL', url: 'https://www.mysql.com' }, + { name: 'Firebase', url: 'https://firebase.google.com' }, + { name: 'Git', url: 'https://git-scm.com' } +];