Skip to content
Snippets Groups Projects
Commit 16a0ff1c authored by Gilgard's avatar Gilgard
Browse files

fix tests after merge

parent 902a3738
No related branches found
No related tags found
1 merge request!66Frontend tests
Pipeline #178512 passed
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ChatMessageComponent renders correctly 1`] = `
<div
class="w-full break-words flex justify-start"
>
<div
class="bg-gray-300 rounded px-5 py-2 my-2 relative text-gray-900"
style="max-width: 70%;"
>
<span
class="block"
>
string 1
</span>
<span
class="block text-xs text-right"
>
10:20
</span>
</div>
</div>
`;
import { mount } from "@vue/test-utils";
import ChatMessage from "@/components/ChatComponents/ChatMessage.vue"
describe("ChatMessageComponent", () => {
let wrapper;
beforeEach(() => {
wrapper = mount(ChatMessage, {
//passing prop to component
computed: {
userID() {
return 1;
}
},
props: {
message: {
id: 1,
content: "string",
timestamp: "2022-04-29T08:20:42.850Z",
from: 1,
to: 3
}
}
});
});
it("renders correctly", () => {
expect(wrapper.element).toMatchSnapshot();
});
it("is instantiated", () => {
expect(wrapper.exists()).toBeTruthy();
});
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment