diff --git a/src/qComponents/QInputNumber/QInputNumber.test.js b/src/qComponents/QInputNumber/QInputNumber.test.js new file mode 100644 index 00000000..623a1f98 --- /dev/null +++ b/src/qComponents/QInputNumber/QInputNumber.test.js @@ -0,0 +1,23 @@ +import Component from './src/QInputNumber.vue'; + +describe('QInputNumber', () => { + it('should match snapshot', async () => { + const { element } = shallowMount(Component); + + expect(element).toMatchSnapshot(); + }); + + it('should match snapshot without controls', async () => { + const { element } = shallowMount(Component, { + propsData: { + controls: false + } + }); + + expect(element).toMatchSnapshot(); + }); + + it('data should match snapshot', () => { + expect(Component.data()).toMatchSnapshot(); + }); +}); diff --git a/src/qComponents/QInputNumber/__snapshots__/QInputNumber.test.js.snap b/src/qComponents/QInputNumber/__snapshots__/QInputNumber.test.js.snap new file mode 100644 index 00000000..71d533f3 --- /dev/null +++ b/src/qComponents/QInputNumber/__snapshots__/QInputNumber.test.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`QInputNumber data should match snapshot 1`] = ` +Object { + "number": null, + "prevNumber": null, + "userNumber": null, +} +`; + +exports[`QInputNumber should match snapshot 1`] = ` +