Skip to content

Instantly share code, notes, and snippets.

@almet almet/-
Created Jun 6, 2016

Embed
What would you like to do?
/*eslint no-unused-vars: [2, { "varsIgnorePattern": "^d$" }]*/
import { expect } from "chai";
import sinon from "sinon";
import config from "../../formbuilder/config";
import { createComponent, d } from "../test-utils";
import FieldList from "../../formbuilder/components/builder/FieldList";
describe.only("FieldList", () => {
const noop = () => {};
var sandbox, schema, compProps;
schema = {
title: "My new form",
properties: []
};
beforeEach(() => {
sandbox = sinon.sandbox.create();
});
afterEach(() => {
sandbox.restore();
});
describe("Default state", () => {
it("should not show action links when no data has been entered", () => {
compProps = {
schema,
addField: noop,
fieldList: config.fieldList
};
const comp = createComponent(FieldList, compProps);
d(comp.query());
expect(comp.query()).eql("loading");
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.