Replies: 1 comment 1 reply
-
Update: The same happens with component tests in cypress. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying to write testcases in the vitest/Vue Test Utils (the official vue test environment) by using formkit, but I am getting:
test/formkit.test.ts > renders a FormkitComponent
Error: Unknown input type "text" ("text_1")
❯ error node_modules/@formkit/core/dist/index.mjs:236:11
❯ useInput node_modules/@formkit/vue/dist/index.mjs:914:9
❯ setup node_modules/@formkit/vue/dist/index.mjs:703:22
❯ callWithErrorHandling node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:156:18
❯ setupStatefulComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7190:25
❯ setupComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7151:36
❯ mountComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5555:7
❯ processComponent node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5521:9
❯ patch node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5007:11
❯ ReactiveEffect.componentUpdateFn [as fn] node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5664:11
Here is my testcase:
import { mount } from '@vue/test-utils'
import { plugin, defaultConfig } from '@formkit/vue'
// The component to test
const FormkitComponent = {
template: ''
}
test('renders a FormkitComponent', async () => {
const wrapper = mount(FormkitComponent, {
global: {
plugins: [plugin, defaultConfig]
}
})
})
It seems that there is the same issue like already described in :
#115 regarding ESM. But I have not managed to use the solution here.
Does anyone have already written testcases in that environment ? I cannot find any example by google.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions