Squashed commit message
Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled

This commit is contained in:
2026-03-11 22:08:41 +03:00
commit 01458e3b4c
589 changed files with 65788 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { describe, it, expect } from 'vitest';
import { mount } from '@vue/test-utils';
import Price from '@/components/Price.vue';
describe('Price.vue', () => {
it('должен отображать цену с символом рубля', () => {
const wrapper = mount(Price, {
props: {
value: 1000,
},
});
expect(wrapper.text()).toContain('₽');
expect(wrapper.text()).toContain('1 000');
});
it('должен использовать значение по умолчанию 0', () => {
const wrapper = mount(Price, {
props: {},
});
expect(wrapper.text()).toContain('₽');
});
it('должен форматировать большие числа', () => {
const wrapper = mount(Price, {
props: {
value: 1234567,
},
});
expect(wrapper.text()).toContain('1 234 567');
});
it('должен обрабатывать нулевое значение', () => {
const wrapper = mount(Price, {
props: {
value: 0,
},
});
expect(wrapper.text()).toContain('₽');
});
});