import "reflect-metadata"; import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../utils/test-utils"; import {Connection} from "../../../src/connection/Connection"; import {Post} from "./entity/Post"; import {expect} from "chai"; describe("other issues > double inheritance produces multiple duplicated columns", () => { let connections: Connection[]; before(async () => connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], })); beforeEach(() => reloadTestingDatabases(connections)); after(() => closeTestingConnections(connections)); it("should not produce duplicate columns", () => Promise.all(connections.map(async function(connection) { // insert a post const post = new Post(); post.title = "hello"; await connection.manager.save(post); // check if it was inserted correctly const loadedPost = await connection.manager.findOne(Post); expect(loadedPost).not.to.be.empty; loadedPost!.title.should.be.equal("hello"); }))); });