Skip to content

Instantly share code, notes, and snippets.

@harrybeckwith
Last active November 8, 2019 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harrybeckwith/94a3fbac17f906f6cb4c096da990a3e9 to your computer and use it in GitHub Desktop.
Save harrybeckwith/94a3fbac17f906f6cb4c096da990a3e9 to your computer and use it in GitHub Desktop.
A basic unit test file
import Spinner from "@/ui/Spinner";
import AppLoadingScreen from "./AppLoadingScreen";
import { shallowMount } from "@vue/test-utils";
import { expect } from "chai";
describe("AppLoadingScreen", () => {
let component;
beforeEach(() => {
component = shallowMount(AppLoadingScreen);
});
it("should render Spinner on mount", () => {
expect(component.find(Spinner).exists()).to.be.true;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment