Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit a7acb09

Browse files
committed
fix: tests
1 parent 85396d3 commit a7acb09

File tree

3 files changed

+4
-24
lines changed

3 files changed

+4
-24
lines changed

packages/bootstrap-vue-next/src/components/BButton/BButton.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ const loadingBoolean = useBooleanish(() => props.loading)
111111
112112
const isToggle = computed<boolean>(() => typeof pressedBoolean.value === 'boolean')
113113
const isButton = computed<boolean>(
114-
() => props.tag === 'button' && props.href === undefined && props.to === null
114+
() => props.tag === 'button' && props.href === undefined && props.to === undefined
115115
)
116116
const computedLink = computed<boolean>(() => isLink(props))
117-
const isBLink = computed<boolean>(() => props.to !== null)
117+
const isBLink = computed<boolean>(() => props.to !== undefined)
118118
const nonStandardTag = computed<boolean>(() => (props.href !== undefined ? false : !isButton.value))
119119
120120
const computedClasses = computed(() => [

packages/bootstrap-vue-next/src/components/BFormInput/form-input.spec.js

-20
Original file line numberDiff line numberDiff line change
@@ -190,26 +190,6 @@ describe('form-input', () => {
190190
expect($input.attributes('type')).toBe('number')
191191
})
192192

193-
it('renders text input when type not supported', () => {
194-
const warnHandler = vitest.fn()
195-
196-
const wrapper = mount(BFormInput, {
197-
global: {
198-
config: {
199-
warnHandler,
200-
},
201-
},
202-
props: {
203-
type: 'foobar',
204-
},
205-
})
206-
207-
const $input = wrapper.get('input')
208-
expect($input.attributes('type')).toBe('text')
209-
210-
expect(warnHandler).toHaveBeenCalled()
211-
})
212-
213193
it('does not have is-valid or is-invalid classes when state is default', () => {
214194
const wrapper = mount(BFormInput)
215195

packages/bootstrap-vue-next/src/components/BLink/BLink.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const props = withDefaults(defineProps<BLinkProps>(), {
5151
routerTag: 'a',
5252
target: '_self',
5353
to: undefined,
54-
variant: undefined,
54+
variant: null,
5555
opacity: undefined,
5656
opacityHover: undefined,
5757
underlineVariant: null,
@@ -142,7 +142,7 @@ const routerAttr = computed(() => ({
142142
'to': props.to,
143143
'href': computedHref.value,
144144
'target': props.target,
145-
'rel': props.target === '_blank' && props.rel === null ? 'noopener' : props.rel || null,
145+
'rel': props.target === '_blank' && props.rel === undefined ? 'noopener' : props.rel || undefined,
146146
'tabindex': disabledBoolean.value
147147
? '-1'
148148
: typeof attrs.tabindex === 'undefined'

0 commit comments

Comments
 (0)