CSR-120: make prop required
This commit is contained in:
parent
53760c6794
commit
9713b7fdd6
2 changed files with 7 additions and 4 deletions
|
|
@ -1,16 +1,16 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
import vehicleBanner from './vehicle-banner';
|
||||
import { getMountOptions } from "@/helpers/unit-test-helper.js";
|
||||
|
||||
describe('vehicleBanner', () => {
|
||||
|
||||
test('renders the blurrycar image', () => {
|
||||
// Arrange
|
||||
const mountOptions = getMountOptions({});
|
||||
|
||||
// Act
|
||||
const wrapper = shallowMount(vehicleBanner, {
|
||||
...mountOptions
|
||||
propsData: {
|
||||
vehicleImageSrc: "image_url",
|
||||
},
|
||||
});
|
||||
|
||||
// Assert
|
||||
|
|
|
|||
|
|
@ -12,7 +12,10 @@
|
|||
export default {
|
||||
name: "vehicle-banner",
|
||||
props: {
|
||||
vehicleImageSrc: String
|
||||
vehicleImageSrc: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue