Skip to content

Instantly share code, notes, and snippets.

@SSmale
Created May 11, 2018 15:12
Show Gist options
  • Select an option

  • Save SSmale/d7026c9c36e7ba9f3e038ce6c499b980 to your computer and use it in GitHub Desktop.

Select an option

Save SSmale/d7026c9c36e7ba9f3e038ce6c499b980 to your computer and use it in GitHub Desktop.
import { expect } from "chai";
// import { getters } from "@/store/modules/tickets";
import { getters } from "../src/store/modules/tickets/index";
describe("getters", () => {
it("should get all tickets", () => {
const state = {
tickets: [
{
id: "-L19YK2qXcThgu3lt43_",
title: "Title",
message: "Messgae",
imageUrl: "https://www.w3schools.com/w3css/img_forest.jpg",
status: "Open",
user: "V0TCs7WhdAaoACGcwGNkhxcG2Tl2"
},
{
id: "-L19aaRwC-krpGkdly9a",
title: "title",
message: "dsfa",
imageUrl: "",
status: "Open",
user: "V0TCs7WhdAaoACGcwGNkhxcG2Tl2"
},
{
id: "-LC07af1-kaEgCJ2lCMh",
title: "new Ticket",
message: "I am a new ticket\n",
imageUrl:
"https://images.pexels.com/photos/8101/sea-sky-sunset-water.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",
status: "Open",
user: "V0TCs7WhdAaoACGcwGNkhxcG2Tl2"
},
{
id: "-LC4YYUChY7VPBn00Xw6",
title: "hello app",
message: "this is cool",
imageUrl: "https://gph.is/VwwNLT",
status: "Open",
user: "OYHxE8moZcZKW2B6pHS6elLXF8t2"
},
{
id: "-LC4ZCyug5s6973OBL51",
title: "",
message: "",
imageUrl:
"https://static.pexels.com/photos/248797/pexels-photo-248797.jpeg",
status: "Open",
user: "OYHxE8moZcZKW2B6pHS6elLXF8t2"
},
{
id: "-LC4ZTL5ApSFYOMq186E",
title: "test real time",
message: "hello",
imageUrl: "",
status: "Open",
user: "OYHxE8moZcZKW2B6pHS6elLXF8t2"
}
]
};
const result = 2 + 3;
expect(result).to.equal(4);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment