Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@almet
Created June 6, 2016 20:21
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 almet/b4b1259d1ed9999e21bc8ca1e63a39c0 to your computer and use it in GitHub Desktop.
Save almet/b4b1259d1ed9999e21bc8ca1e63a39c0 to your computer and use it in GitHub Desktop.
/*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