Skip to content
Snippets Groups Projects
Commit 273eefad authored by Tom Robinson's avatar Tom Robinson
Browse files

Moar test

parent 126a4c03
Branches
Tags
No related merge requests found
......@@ -11,9 +11,15 @@ describe("Metadata", () => {
describe("fromEntities()", () => {
it("should return the right number of databases", () => {
const m = Metadata.fromEntities({
databases: { 1: {}, 2: {}, 3: {}}
databases: { 1: { name: "foo", tables: [1] }, 2: {}, 3: {}},
tables: { 1: { name: "bar", fields: [1] } },
fields: { 1: { name: "baz" }}
});
expect(m.databases().length).toEqual(3);
expect(m.database(1).name).toEqual("foo");
expect(m.table(1).name).toEqual("bar");
expect(m.field(1).name).toEqual("baz");
expect(m.databases()[0].tables()[0].fields()[0].name).toEqual("baz");
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment