Skip to content

Commit 0a5bd8d

Browse files
committed
using props for files : tests
1 parent b18c492 commit 0a5bd8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/components/FileSelector.nuxt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe("FileSelector.vue", async () => {
9797
})
9898

9999
await flushPromises()
100-
expect(wrapper.componentVM.files).toEqual(files)
100+
expect(wrapper.componentVM.props.files).toEqual(files)
101101
expect(wrapper.emitted()).toHaveProperty("update_values")
102102
expect(wrapper.emitted().update_values).toHaveLength(1)
103103
expect(wrapper.emitted().update_values[0][0]).toEqual({
@@ -124,7 +124,7 @@ describe("FileSelector.vue", async () => {
124124

125125
const file_uploader = wrapper.findComponent(FileUploader)
126126
console.log("wrapper", wrapper)
127-
expect(wrapper.vm.files).toEqual(files)
127+
expect(wrapper.vm.props.files).toEqual(files)
128128
const upload_files = vi.spyOn(file_uploader.vm, "upload_files")
129129
expect(upload_files).not.toHaveBeenCalled()
130130
})

0 commit comments

Comments
 (0)